Part of the ‘Register & Login’ Project from PHP Academy. This tutorials walks you through how to process a username and password based login against details found in a database, set a session, and process a logout function.
PHP Tutorials: Register & Login: User login (Part 2)
June 29th, 2010
phpmoz 
Posted in
Tags: 

This is a very complicated way of doing it, but good tutorial.
Parse error: syntax error, unexpected T_VARIABLE in /home/saddii/public_html/login.php on line 14
heres the URL: (h t t p : / /w w w . s a d d i i . a 6 0. u s / i n d e x 1 . p h p)
what did i do wrong?
@dashbyictfd no no you’ll probably be fine, i just went the complete tut and forgot to save this part, so it was like i never did it
I need help i keep getting this error
PHP Error Message
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
/home/a3960245/public_html/login.php on line 15
That user doesn’t exist!
Can anyone help me??
@C0LEMAN777 Never saved what? dont tell me I am going to follow a tutorial and its only half done????????????????
I am getting an error with this line of code
$numrows = mysql_num_rows($query);
echo $numrows;
The error is
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ezaphpol/public_html/inc/login_go.php on line 13
If I remove both lines the basic login works but when I continue with the tutorial I get the error, any suggestions?
…>=(
I did get it finished and working… just to find out 4 tutorials later that it never saved!
What the $#!@
I’m going crazy! can you please upload the code thus far? i just cant get it…
@tomasdelucca2711 will it work exaktly the same? when i erase the while-loop it worked.
@Alexeithekiller Thanks man for your reply.
@phasoladas That usually means that the query that you did had an error in the snytax.
-Hope it helped
thank you 4 ur knowledge..
@phpacademy i already have notepad++
@saadlulu i already have it
@jameswx09 or u can use something called “notepad++” a free software.
Php its unhappy with
$numrows = mysql_num_rows($query);
echo $numrows;
I’am getting this error
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given.
searching google and I can’t figure out what cause this error.
Visit my channel. I offer a Free PHP User Registration System including: Log in, Log out, Register New User, Update User Profile
All the years I have been coding, fetch_assoc always makes me laugh.
nice tut!
@NUKE547 me too do yo figure it out?
Tried this word for word but it’s not doing anything :S
I’ve tried putting the right username in and tried fake username etc but nothing. Don’t get error messages page just refreshes and no action.
Great tutorial though.
I would never have been able to do this without you. Thank you. First time in a long time that I subcribed to some one who really really deserves it.
it just says user does not exist all the time when it realy does lol any sugestions
Great videos, helping me out heaps in my studies of php and MySql,
But, are you using PHP 5?? because this didn’t work for me until I changed…
if ($numrows !=0) to if ($numrows !=1)
Has anyone else had this problem?
thanks alex you are amazing man, brilliant job!! the way you explain things, rare ppl can achieve it. Well done
[...] the rest here: PHP Tutorials: Register & Login: User login (Part 2) | PHP Blog Share and [...]