I am doing a simple form to mail script but for some reason I never get the results.
Here is my code
<?
/* this part can either be in the same file as the form or it can be in a different file. If you want this in a different file, make the "action" of the form go to that file */
if(sizeof($_POST)) {
$body = "";
while(list($key, $val) = each($HTTP_POST_VARS)) {
$body .= "$key: $val\n";
}
mail("myemail@mydomain.com", // to
"Subject Line",
$body);
echo "Thanks for your submission. The results were mailed.";
}
// end form processing
?>
<form
method=post
action=<? echo $PHP_SELF; ?>>
<input type=text name=whatever>
<input type=radio name=this value=radioval>
<select name=another>
<option value=sel1>Select 1
<option value=sel2>Select 2
</select>
<input type=submit name=submit>
</form>
Form to mail
Moderator: General Moderators
Form to mail
Last edited by twooly on Sat Mar 06, 2004 12:12 pm, edited 1 time in total.