Hi again, I also have another question.
I have another two pages that act as a login and the login page. This is the log.php page.
<form action="welcome.php" method="post">
User Name: <input type="text" name="name">
Password: <input type="password" name="password">
<input type="submit" value="Login">
<?php
$name = $POST["name"];
$pass = $POST["password"];
if ($name && $pass == "admin")
header('Location: ../welcome.php');
else
header('Location: ../log.php');
?>
</form>
and this is the welcome.php page.
<h2><center>Welcome <?php echo $_POST["name"]; ?>!</center></h2>
<a href=next.php>Site 1
<a href=admin.php>Admin Site
Basically i want a pre defined user with the password being the same, both "admin". If someone enters admin in both fields its suppose to redirect to the welcome page, if not it go's back to the login. Im not sure exactly what file i should put the first piece of php code.