I am new to php so help will be appreciated. I am trying to submit this form for signing in.
<form method="post" action="sign_in_process.php">
<table>
<tr>
<td>
<label>E-mail: </label>
</td>
<td>
<input type="text" id="e_mail_address" name="email" />
</td>
</tr>
<tr>
<td id="e_passwd">
<label>Password: </label>
</td>
<td>
<input type="text" id="passwd" name="pass"/>
</td>
</tr>
</table>
<table>
<tr>
<td id="remember-me">
<input type="checkbox" value="remember" id="remember" />
Remember me
</td>
<td>
<button type="submit" id="sign_in_btn" name="sign_in_btn"></button>
</td>
</table>
</form>
This is my sign_in_process.php page
session_start();
if(isset($POST['sign_in_btn']))
{
$user_email=trim($POST['email']);
$user_password=hash("sha256",$POST['pass']);
check_email($user_email);
check_password($user_password);
if(isset($_SESSION['error']))
{
header("Location:sign-in.php");
}
else
{
$query="SELECT * from user WHERE user_email='$user_email' AND user_password='$user_password'";
$retrieve=new retrieve();
$hold=$retrieve-getdata($query);
if($hold['user_active']==1)
{
$_SESSION['login']==true;
$_SESSION['email']=$user_email;
$_SESSION['pass']=$user_password;
$_SESSION['username']=$hold['user_name'];
$_SESSION['user_id']=$hold['user_id'];
header("Location:index.php");
}
else if($hold['user_active']==0)
{
echo "you have to activate your account first by clicking the link we have sent you on your email";
}
else if(!$holder)
{
echo "invalid user";
}
}
}
But when i try to sign in then nothing happens though i can see in the URL that form is submitted and it does go to sign_in_process.php but it doesn't perform anything it simply shows a blank page. In the code above check_email and check_password are simply the functions i m using for validation which i have in my functions.php file. I am requiring that function class with require_once.