Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 12-03-2004, 10:52 PM   #1
In Runtime
 
Windwaker222's Avatar
 
Join Date: Nov 2004
Posts: 351
Default php/mysql error

EDIT : oops..wrong programming forum..sorry

Here is the error I'm getting. It is for a login script :

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/ogwnet2.hollosite.com/login.php on line 30

Code:
if($submit){
               $conn = mysql_connect($host, $db_username, $db_password);
               $db = mysql_select_db($db_name) or
               print ("We are currently having troubles with the database.  Sorry for the inconvenience.  Please try again later.");
               
               
               
               $query = "SELECT * FROM login WHERE username LIKE '$username' AND password LIKE '$password'";   
               $result = mysql_query($query);
               $numrow = mysql_num_rows($result);
               
               if ($numrow==1) {
               print ("You have succesfully loged in as $username");
               }else{
               print ("There has been no account found under this name.  Please check for spelling and try again.");
               }
               }
               else{
               echo("Please Log-In to continue...<br>
               <form method=\"post\" action=\"login.php\">
               <input type=\"text\" name=\"username\" /><br>
               <input type=\"password\" name=\"password\" /><br>
               <input type=\"submit\" value=\"submit\" name=\"submit\" />
               </form>
               ");
            }
__________________

__________________
AMD Phenom 9600 / 4GB OCZ Gold / nVidia 8800GT / ASUS Crosshair 4xPCI-E
Windwaker222 is offline   Reply With Quote
Old 12-04-2004, 07:54 PM   #2
In Runtime
 
Windwaker222's Avatar
 
Join Date: Nov 2004
Posts: 351
Default

anyone??
__________________

__________________
AMD Phenom 9600 / 4GB OCZ Gold / nVidia 8800GT / ASUS Crosshair 4xPCI-E
Windwaker222 is offline   Reply With Quote
Old 12-04-2004, 09:00 PM   #3
BSOD
 
pcmxkeith's Avatar
 
Join Date: Dec 2004
Posts: 842
Send a message via AIM to pcmxkeith Send a message via MSN to pcmxkeith Send a message via Yahoo to pcmxkeith
Default Re: php/mysql error

i think i have an idea on it. Whats your website ?
pcmxkeith is offline   Reply With Quote
Old 12-04-2004, 09:01 PM   #4
BSOD
 
pcmxkeith's Avatar
 
Join Date: Dec 2004
Posts: 842
Send a message via AIM to pcmxkeith Send a message via MSN to pcmxkeith Send a message via Yahoo to pcmxkeith
Default Re: php/mysql error

print ("There has been no account found under this name. Please check for spelling and try again.");
}
}
remove one of the }
pcmxkeith is offline   Reply With Quote
Old 12-05-2004, 09:11 AM   #5
In Runtime
 
Windwaker222's Avatar
 
Join Date: Nov 2004
Posts: 351
Default

yea tried that and gives an error on line 40
__________________
AMD Phenom 9600 / 4GB OCZ Gold / nVidia 8800GT / ASUS Crosshair 4xPCI-E
Windwaker222 is offline   Reply With Quote
Old 12-05-2004, 09:13 AM   #6
BSOD
 
pcmxkeith's Avatar
 
Join Date: Dec 2004
Posts: 842
Send a message via AIM to pcmxkeith Send a message via MSN to pcmxkeith Send a message via Yahoo to pcmxkeith
Default Re: php/mysql error

Well i think php is just ... :-/
pcmxkeith is offline   Reply With Quote
Old 12-05-2004, 09:14 AM   #7
BSOD
 
pcmxkeith's Avatar
 
Join Date: Dec 2004
Posts: 842
Send a message via AIM to pcmxkeith Send a message via MSN to pcmxkeith Send a message via Yahoo to pcmxkeith
Default Re: php/mysql error

Whats the website your installing at?
pcmxkeith is offline   Reply With Quote
Old 12-05-2004, 09:21 AM   #8
In Runtime
 
Windwaker222's Avatar
 
Join Date: Nov 2004
Posts: 351
Default

http://ogwnet2.hollosite.com

its just the layout basically (menu is pink cuz im colorblind)

and the page itself is

http://ogwnet2.hollosite.com/login.php
__________________
AMD Phenom 9600 / 4GB OCZ Gold / nVidia 8800GT / ASUS Crosshair 4xPCI-E
Windwaker222 is offline   Reply With Quote
Old 12-05-2004, 10:17 AM   #9
BSOD
 
pcmxkeith's Avatar
 
Join Date: Dec 2004
Posts: 842
Send a message via AIM to pcmxkeith Send a message via MSN to pcmxkeith Send a message via Yahoo to pcmxkeith
Default Re: php/mysql error

that site dont work..
pcmxkeith is offline   Reply With Quote
Old 12-05-2004, 10:18 AM   #10
BSOD
 
pcmxkeith's Avatar
 
Join Date: Dec 2004
Posts: 842
Send a message via AIM to pcmxkeith Send a message via MSN to pcmxkeith Send a message via Yahoo to pcmxkeith
Default Re: php/mysql error

wait nvm... you need to remove www. (Im such a dork .)
__________________

pcmxkeith is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:29 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0