用户点击提交后,我怎样才能得到一个弹出框或简单的“谢谢”字样?最简单的方法:
<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 ='something@gmail.com';
$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.";
}
?>