I have an Login Form which is linked to login.php. In there, if the password is wrong I have this:
$msg = 'Password is wrong!';
header('Location: /index.php?msg='.$msg);
And this is processed by the index.php file:
if(isset($_REQUEST['msg'])){
$msg = $_REQUEST['msg'];
echo($msg);
}
When I use the url in the browser eg. index.php?msg=test
it works completly fine but when I use the form, it only redirects to Site Root eg. site.com
without the index.php?msg=test
.
I hope my problem is clear.
Thanks in advance.