Hello,
I'm realtively new to PHP but have managed login script and gallery (coppermine).
Now i'm working on an admin page that will only let the administrator create new members.
Got three pages: html start and asking for admin name and pw.
Works all well.
then a php file that checks weather the credentials are correct.
and this is where i go wrong.
I'd like to make sure that when they are correct the administrator is redirected to another page (admin.php)
But it doesn work that way the browser gives me a blank page...
My check.php file is:
<?php
$name=$_POST['name'];
$pass=$_POST['pass'];
if ($name==("admin") & $pass==("login") ) {
$_SESSION['name']="name";
$_SESSION['pass']="pass";
header("admin.php");
}
else echo 'Something went wrong. Go again';
?>
When the credentials are wrong i do get the message 'Something went wrong. Go again'.
any suggestions?