Pass the error indicator to the home page. You can do that by invoking the home page (using the header() function) and passing the error indicator in the url.
Something like [php]header('Location: homepage.php?showerror=1');[/php]
Your home page then must check for the error trigger set in the $_GET array and print the message, like:
[php]
if (isset($_GET['showerror']) AND $_GET['showerror'] == 1) {
print'<p><strong>Please make sure you enter both <br />username and password!</strong></p>';
}[/php]
Ronald :cool:
Thanks... It work for me...
But if i want the pop up window for the users when they don't enter the username or password or they insert invalid username or password, is it need to use javascript??
how to code it??? Thanks.. :)