PHP/MySQL

Eldarion

New Member
Messages
10
Reaction score
0
Points
0
I installed a PHP script on my server with a log-in procedure, yet when I try to log in I get the following error:

Warning
: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/eldarion/public_html/tim/index.php on line 20

does anybody have a clue how I can solve this?
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
the contents of 'index.php'
would be helpful
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Better: what script did you install, and did you make it yourself or is there a link for more information about it?

That error usually means one of several things, but they all come down to the same type of error: MySQL is not returning a result set, it's returning an error. That could be a failed login, a query on a non-existant table, a query with anon-existant field, a badly formed query, etc.

Obviously something broke, and it's related to mysql - whether its a failed login or not I don't know, but if there's special directions on how to install the script, it's possible a step was missed which is resulting in the error.
 

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
I installed a PHP script on my server with a log-in procedure, yet when I try to log in I get the following error:

Warning
: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/eldarion/public_html/tim/index.php on line 20

does anybody have a clue how I can solve this?

Check this out.

(1).Check whether the database name is correct and the username and password supplied.
(2).Check whether the database is created and the username and password you have specified has been created and configured(permission settings)
(3).Check whether the table name in the query you have specified belongs to the connected database and the spelling is nice.

If still the error is thrown, then post that set of line along with the query and connection coding for further debugging.
 

Eldarion

New Member
Messages
10
Reaction score
0
Points
0
it's been fixed.. turns out the contents of the database weren't loaded correctly.. but it's working now :)

thanks for your help all :)
 
Top