2016-02-07 36 views
0

這是我的代碼:重定向提交後PHP [duplicate1]

<input type="submit" name="send" class="do__order" value="order" > 

現在,我希望表單數據被提交後,提交給我選擇的任何頁面重定向,我該怎麼辦呢?

回答

0

以下行添加到該腳本:

header('Location: http://www.example.com/');

0

你可以嘗試這樣的事情頁面上,你做你的支票。比方說,它的check.php

if(isset($_POST['send'])){ 
    header('Location: somewhere.php'); 
} 

而且你還需要一個method屬性添加到您的form標籤,在這種情況下,將post,所以method="post"actionaction="check.php"