I have created a small web site with a registration page.I want to get after the user fill the registration form and click the submit button , the page must be redirected to the login page.That redirection part is not working.Here is my database connection code to add data to my database and header function to redirect to login page. But when I test this in localhost, white blank page is shown as redirected page.Is there any error in this code.Data is successfully added to the database.That part is OK.If I put an echo statement right after the header() , that will be shown but not redirect to Login_page.I typed the header() as this also(header("Location:http//Login_page.html")).But the same problem arise.Please help me.Thanks.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$con = mysql_connect("localhost","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("Real Truth", $con);
$sql="INSERT INTO register
VALUES
('$_POST[First_Name]','$_POST[Last_Name]','$_POST[E_Mail]','$_POST[Phone_No]','$_POST[Address]','$_POST[Career]','$_POST[username]','$_POST[password]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
else{
**header("Location:Login_page.html");**
}
mysql_close($con);
?>
</body>
</html>