W
wwjd_kilden
Guest
Help programmers
I've stolen some code : PHP Login script tutorial
to find out how to make logins using PHP. All well so far, only I adjusted for mysqli and altered the chec_klogin page to contain a bit of code saying
else{
header("location:main_login.php");
}
...to send the user back to the login if the login info fails
In doing this, it would make sense to tell the user why they are back at a blank login (ie the standard "Username or password incorrect, please try again." - How do I do this when the login page and the login check are in different files?
(I'm not terribly good with PHP yet).
Do I use session variables? If so: How do I check (at the login page) whether or not it is relevant to output the message?
Or something else?
*scratches head*
I've stolen some code : PHP Login script tutorial
to find out how to make logins using PHP. All well so far, only I adjusted for mysqli and altered the chec_klogin page to contain a bit of code saying
else{
header("location:main_login.php");
}
...to send the user back to the login if the login info fails
In doing this, it would make sense to tell the user why they are back at a blank login (ie the standard "Username or password incorrect, please try again." - How do I do this when the login page and the login check are in different files?
(I'm not terribly good with PHP yet).
Do I use session variables? If so: How do I check (at the login page) whether or not it is relevant to output the message?
Or something else?
*scratches head*