ok i have a really stupid question but i can't seem to figure it out.
I have this simple code so that when someone submits info to a form, it gets automatically emailed to my email addy. I have it all working fine and dandy, but the problem is, the action sends you to the mail.php page. Is there a way to make it so that it stays on teh same html page with maybe just a comment above the form saying 'thanks for your submission' ?
Here's the code I have:
html page:
<form method="post" action="mail.php" >
<textarea name="comments" cols="13" rows="5"></textarea><br><br>
<input type="submit" value="Submit">
mail.php page:
<?
$comments=$_POST['comments'];
$to="email@email.com";
$message="$comments";
if(mail($to,"Newsletter Comment",$message,"From: Newsletter Input")) {
echo "<font color=red face='arial' size=2><b>Thanks for your input!</text></b>";
} else {
echo "There was a problem sending the information.";
}
?>