Hi, Thursday, March 4, 2004, 9:08:19 AM, you wrote: mo> Hi,
mo> I have created a small login system for my website. However mo> if a user logs in incorrectly I want to display a error message mo> currently I use the code mo> echo "You could not be logged in! Either the username and mo> password do not match or you have not validated your membership! mo> <br /> mo> Please try again! <br />"; mo> include ("login.php"); mo> However this appears at the top of my website but I want it mo> to appear above the login form so I though I could set a variable mo> in the request called "error" or similar then on the login page mo> just above the login form check for the presence of the request mo> variable "error" and print the appropriate message. So I want to mo> do the following: mo> SET REQUEST VARIABLE ERROR HERE mo> include ("login.php"); mo> But can I set a request variable? i.e in JAVA I would do mo> HttpRequest.setAttribute("error", true); etc.. mo> Any help? mo> Cheers add something like this to login.php if(!empty($error)){ echo '<tr><td>'.$error.'</td></tr>'; } as it is included it will have $error available to it -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php