| 
 Posted by robert on 05/18/06 00:57 
| // test to see if an email address was posted ... if so the form can be 
| processed 
| 
| if($email_address!=""){ 
|  $mailout->send();//send email(s) 
|  } 
| else{ 
|  echo "An email address was not entered"; 
|  } 
| ?> 
 
just add a name to a submit button and set its value to 1. ex.: 
 
<form method=post> 
  // your fields for the user to enter data here. 
  <input type=submit name=sendIt value=1 /> 
</form> 
 
in your php code, first look for: 
 
<? 
$sendIt = $_POST['sendIt'] ? true : false; 
 
if ($sendIt) 
{ 
  // add validation here to make sure all data is 
  // present and not harmful (like email injections, etc.) 
  // now, send the mail 
} 
?>
 
  
Navigation:
[Reply to this message] 
 |