用戶點擊提交後,如何獲得彈出框或簡單的說「謝謝」?可能最簡單的方法:用戶點擊提交後提供反饋
<div id="suggestion">
<div class="control-group">
<div class="controls">
<input type="submit" value="Send" class="btn btn-info" />
這是PHP:
<?php
// Email of sender
$videogamename = $_POST['namevideogame'];
// From (Sender Name)
$artistname = $_POST['nameofartist'];
$header = "from: Game AMV";
// Message
$message = "Name of Video Game: ".$videogamename."\r\n\nName of Artist/Song: ".$artistname."\r\n\nLink: ".$_POST['link'];
// Enter your email address
$to ='[email protected]';
$send_contact = mail($to, 'New Song Suggestion from gameamv.com', $message, $header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
header("location: http://gameamv.com/");
} else {
echo "Error. The form was not submitted. Please try again.";
}
?>
只要提醒('謝謝.....');這是你想要的? – PSL 2013-04-22 02:36:51
「用戶點擊提交後,我怎樣才能得到一個彈出框或簡單的說,」謝謝「?最簡單的方式」 - 或不,這是一個更好的UI設計... – 2013-04-22 02:38:08
記得要在執行'header('Location:$ url');' – Raptor 2013-04-22 02:41:40