i need help with a login page
when my visitor logs in he puts his username and password which are checked against the registration table in mysql...if these are correct it logs him in and stores a cookie with the username he used.
i also need his email to be stored in the cookie, and the email can be found in the same line of the table registration where i checked his username and password were correct.
how do i get his email stored in the cookie as well?
session_start ();
$_SESSION['myusername'] = $_POST['myusername'];
$_SESSION['mypassword'] = $_POST['mypassword'];
$_SESSION['myemail'] = $_POST['myemail'];
$_SESSION['login'] = 'yes';
session_write_close ();
header ( 'location: login_success.php' );
exit ();
this is what i use at the end of the script to check the login details are correct and to create the session cookie....how do i implement what u said into this?
when my visitor logs in he puts his username and password which are checked against the registration table in mysql...if these are correct it logs him in and stores a cookie with the username he used.
i also need his email to be stored in the cookie, and the email can be found in the same line of the table registration where i checked his username and password were correct.
how do i get his email stored in the cookie as well?
session_start ();
$_SESSION['myusername'] = $_POST['myusername'];
$_SESSION['mypassword'] = $_POST['mypassword'];
$_SESSION['myemail'] = $_POST['myemail'];
$_SESSION['login'] = 'yes';
session_write_close ();
header ( 'location: login_success.php' );
exit ();
this is what i use at the end of the script to check the login details are correct and to create the session cookie....how do i implement what u said into this?