[英]Jquerymobile Page Redirecting with URL through PHP?
這里我有一個問題,用PHP表單重定向URL提交頁面正在更改但是URL沒有更改.......
這是代碼:
<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");
}
?>
但它正在重定向並且url沒有改變它顯示如http:localhost/sample/addForm.php#/sample/insert.php
其實我想要它像http:localhost/sample/sample.php
或http:localhost/sample/index.php
嘗試,
if($name != '')
{
header("Location: /sample/sample.php");
}
else
{
header("Location: /sample/index.php");
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.