- Joined
- Jun 26, 2008
- Messages
- 1,517
- Reaction score
- 2
Okay heres what I've come up with.
The index.php is below and is just a picture and login form.
So if they already logged in I want it to redirect to home.php.
Any help would be great
The index.php is below and is just a picture and login form.
So if they already logged in I want it to redirect to home.php.
PHP:
<html>
<title>~ Homepage ~</title>
<center>
<?php
session_start();
$_SESSION['username']=$username;
if(isset($_SESSION['username']
{
//redirect to home.php
}
else
{ ?>
<img src="images/jose.jpg"></img>
<h1>Welcome.</h1>
<h2>Please Login :)</h2>
<br /> <br /> <br />
<form action="login.php" method="POST">
Username: <input type='text' name='username'> <br /><br />
Password: <input type='password' name='password'> <br /><br />
<input type='submit' value='Login!'>
</form>
<br>
<a href="register.php">Don't Have an Account? Register now!</a>
<?php } ?>
</center>
</html>
Any help would be great
