I have written a sign up page in php, everything is ok and values are being saved in database but its not opening next page after the values are saved into the database here is my code. Kindly check what might be the issue.
<?php
if (isset($_POST['button']))
{
$st_name=$_POST['st_name'];
$f_name=$_POST['f_name'];
$email=$_POST['email'];
$re_email=$_POST['re_email'];
$pass=$_POST['pass'];
$re_pass=$_POST['re_pass'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];
$skype=$_POST['skype'];
$quali=$_POST['quali'];
$country=$_POST['country'];
$city=$_POST['city'];
$date=$_POST['date'];
$g=$_POST['g'];
$image="back.jpg";
if($email!=$re_email){
echo "<script>window.open('sign_up.php?error=email_error','_self')</script>";
}
else if($pass!=$re_pass){
echo "<script>window.open('sign_up.php?error=pass_error','_self')</script>";
}
else{
$que="insert into sign_up(st_name,f_name,email,re_email,pass,re_pass,phone,mobile,skype,quali,country,city,date,gender,image)
values ('$st_name','$f_name','$email','$re_email','$pass','$re_pass','$phone','$mobile','$skype','$quali','$country','$city','$date','$g','$image')";
if(mysql_query($que))
{
$_SESSION['email']=$email;
$_SESSION['pass']=$pass;
header("location: index.php");
}
else{
mysql_error();
}
}
}
?>