setting request variables
| From: | matthew oatham | Date: | Wed, 03 Mar 2004 23:08:19 +0000 |
| Subject: | setting request variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179384@lists.php.net to get a copy of this message | ||
Hi,
I have created a small login system for my website. However if a user logs in incorrectly I want to
display a error message currently I use the code
echo "You could not be logged in! Either the username and password do not match or you have
not validated your membership! <br />
Please try again! <br />";
include ("login.php");
However this appears at the top of my website but I want it to appear above the login form so I
though I could set a variable in the request called "error" or similar then on the login
page just above the login form check for the presence of the request variable "error" and
print the appropriate message. So I want to do the following:
SET REQUEST VARIABLE ERROR HERE
include ("login.php");
But can I set a request variable? i.e in JAVA I would do HttpRequest.setAttribute("error",
true); etc..
Any help?
Cheers