The form file is not redirctng to process2.php file after clickng sign in also when i manually open process2.php file then errors comes like this"undefined user index username and password"............
MAIN FILE (FORM FILE):
<form action="process2.php" method="post">
<div class="input-controls">
<input type="text" name="username" placeholder="username">
<span id="person"></span>
<div id="clear"></div>
</div>
<div class="input-controls">
<input type="password" name="password" placeholder="password">
<span id="key"></span>
<div id="clear"></div>
</div>
<div class="input-controls">
<button type="button" id="login-btn" name="signin"> sign in </button>
</div>
<div id="form-footer">
<a href="#" id="forgot">Forgot Password?</a>
<a href="#" id="create">Create an account</a>
</div>
</form>
PROCESS2.PHP FILE
<?php
$user = $_POST['username'];
$pass = $_POST['password'];
if($user!=" " && $pass!=" ")
{
if(isset($_POST['signin']))
{
setcookie($name,$user,time()+3600);
echo "Cookie is set";
}
}
else
{
header('location:form.php');
}
?>
I Really Appreciate your replies.thanks in advance