PDA

View Full Version : need help of a simple login system


r_amin
09-21-2007, 10:45 PM
I'm looking for a simple login code 'using mysql'
I have a Header Page and a Footer Page.

The login page code is

<?php
session_start();
include "header.html";

if ($_SESSION['name']==Null){
session_unset();
session_destroy();
//Redirect
include "login.html";
}
else{
echo "<br>";
echo 'Welcome:' . $_SESSION['name'];
include "hallo.html";
}
include "footer.html";
?>

Login Code (the Form)

<form method="POST" action="check.php">
<input type="text" name="T1" />
<input type="password" name="T2" />
<input type="submit" name="S1" value="Log In" />
</form>

check.php
I have to check those $T1 and $T2
to confirm that those both are not null
if null then goto "error.html" page
or goto "next.html" page

I need the code of "check.php"
what i used is not working

.........hare I attached my files (.php extention changed to .txt)