I did that and the email and username stuff showed up, but not the password. Looked through the code and found out that $password was actually $pasword. Forgot to put an S
Now i have a problem with the code that checks to see if the username exists
PHP Code:
$sql2 = "SELECT username FROM $usertable WHERE username = $username"; $result = mysql_query($sql2); $count = mysql_num_rows($result);
//checks to see if they let anything blank if($username == "" or $password == "" or $email == ""){ echo "You left something blank! Go back and try again"; }
//checks to see if the username exists elseif($count >= 1){ echo "Username is taken. Please choose a new one.";
I get this error:
Quote:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/mugman1/public_html/evilgeniusstudios/test2/sqlClass.php on line 18
|
I dont get it. It works for my login script (sort of) but it doesnt work for the registration
by the way pcoptimized, did that and its doing everything right. I found out that passwords wernt being added to the database because i mispelled the $password variable. Works now except i get a session error
Quote:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/mugman1/public_html/evilgeniusstudios/test2/index.php:5) in /home/mugman1/public_html/evilgeniusstudios/test2/sqlClass.php on line 66
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/mugman1/public_html/evilgeniusstudios/test2/index.php:5) in /home/mugman1/public_html/evilgeniusstudios/test2/sqlClass.php on line 66
|
Last edited by Slick Nick; 07-17-2006 at 09:51 PM..
|