|
PHP help please. if "The reset button isn't pressed"? -
January 1st, 2008
I need to make it so that when the reset button is not pressed the email is sent. But when it is pressed the message "Cleared" is echo'd. What should I fill in for "The reset button isn't pressed"
<input name="image" type="image" src="images/clear.gif"
onClick="this.form.reset()" />
-----------
<?php
if "The reset button isn't pressed"
{
if (isset($_POST['email']))
{
if (ereg('.+', $_POST["name"]))
{
if (ereg('.+', $_POST["message"]))
{
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['name'] ;
$message = $_REQUEST['message'] . " | " . $_REQUEST['email'];
mail( "christopher.verzonilla@gmail.com", "Subject: $subject",
$message, "christopher@shelterlistings.org" );
echo "Your email has been submitted.";
}
else echo "Please enter a valid message.";
}
else echo "Please enter your name.";
}
else echo "Please enter a valid email address.";
}
else echo "Cleared.";
?>
|