Here i have a problem with redirecting the URL with PHP Form submit the page is Changing But the URL is not Changing.......
Here is the Code:
<form method="post" action="insert.php">
<input type="text" id="emp" name="emp" />
<input type="submit" value="submit" />
</form>
<?php
$name =$_POST['name'];
if($name != '')
{
header("Location :sample.php");
}
else
{
header("Location :index.php");
}
?>
But It is Redirecting and the url is not changing it is displaying like http:localhost/sample/addForm.php#/sample/insert.php
actually i want it like http:localhost/sample/sample.php
or http:localhost/sample/index.php