Added on Wednesday 11 February 2009 16:01:47
by phpacademy
312400 Views
4.8 / 5
904 rates
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.
Parse error: syntax error, unexpected '}' in /home/u370907953/public_html/login.php on line 14
The part of that is:
}
else
die("You didn't enter a password or a username.")
?>
What did I do?
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/content/50/8811650/html/User login.php on line 10
couldn't connect!
how do i fix this error ????
Parse error: syntax error, unexpected T_LOGICAL_OR in C:\xampp\htdocs\good\checklogin.php on line 9. I keep on getthing this error not sure what im doing wrong any idea thanks.
Every one it seems that the first time i tyied this i didn't work but i was using wamp so i tried it on my website, my website host is Cixx6.com so putting the login/register system on my site worked so for all you people if you are using it on wamp and it don't work try upload the system to your site and it might work.
@ActiveBassDestroyer (my previous reply was cut off :|) You would probably want to pass the user's ID or username via a variable (so it's available also on delete.php) and then add this code to delete.php:
$delete = mysql_query("DELETE FROM phplogin WHERE username='" . $_SESSION['username'] . "'"); //Replace $_SESSION['username'] with the variable that stores username
;)
Right now I'm a using Dreamweaver CS5 to write the code, why is it that when I hit Log In @ 8:36 I get directed to the index.php with all the code on the webpage. If your confused, I click Log in just like he does @ 8:40 but instead of me seeing a blank web page, I see my index.php code. What should I do? Where did I mess up?
what i would like to no is there away if someone has a registered with us,that they can delete there account,so they dont have to email me to take them off the database? just saves me from going into phpadmin and deleting the user ,if so what script would i attach for this thanks