PHP Tutorials: Register & Login: User login (Part 2)
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.
April 15th, 2010 at 8:35 am
@phpacademy i already have notepad++
April 15th, 2010 at 8:46 am
@saadlulu i already have it
April 15th, 2010 at 9:41 am
@jameswx09 or u can use something called “notepad++” a free software.
April 15th, 2010 at 10:17 am
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.
April 15th, 2010 at 10:57 am
Visit my channel. I offer a Free PHP User Registration System including: Log in, Log out, Register New User, Update User Profile
April 15th, 2010 at 11:04 am
All the years I have been coding, fetch_assoc always makes me laugh.
April 15th, 2010 at 11:44 am
nice tut!
April 15th, 2010 at 12:25 pm
@NUKE547 me too do yo figure it out?
April 15th, 2010 at 12:52 pm
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.
April 15th, 2010 at 1:32 pm
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.
April 15th, 2010 at 1:35 pm
it just says user does not exist all the time when it realy does lol any sugestions
April 15th, 2010 at 2:05 pm
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?
April 15th, 2010 at 2:22 pm
thanks alex you are amazing man, brilliant job!! the way you explain things, rare ppl can achieve it. Well done
April 15th, 2010 at 2:50 pm
single quotation problem
April 15th, 2010 at 3:43 pm
@freid001 plz help : whats wrong: $query = mysql_query(“SELECT * FROM Game WHERE user=’$myusername”);
plz help : whats wrong: $query = mysql_query(“SELECT * FROM Game WHERE user=’$myusername’”);
youve forgot one
April 15th, 2010 at 4:31 pm
Good Vids !
keep on the good work !
April 15th, 2010 at 5:17 pm
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/login.php on line 22
I don’t see the problem, I have gone over the video a few times now, and rewritten the php but still i get this error message. Any help will be appreciated!
Thanks
April 15th, 2010 at 5:42 pm
@freid001 You can’t have both as “”, you need to have atleast one of each i.e.
$query = mysql_query (“SELECT * FROM users WHERE username=’$username’”);
April 15th, 2010 at 5:50 pm
thx i got it working thx so much this is the only one i have found that attachaly works thx!!!!!
April 15th, 2010 at 6:29 pm
i get this problem $end
April 15th, 2010 at 6:57 pm
plz help : whats wrong: $query = mysql_query(“SELECT * FROM Game WHERE user=’$myusername”);
April 15th, 2010 at 7:41 pm
what do u set $query as ????
April 15th, 2010 at 7:55 pm
it worx!
April 15th, 2010 at 7:57 pm
When i try to log in it doesnt say anything for when i put real username or fake username. page just stays blank
April 15th, 2010 at 8:01 pm
what is md5?