I am having issues with my form when I try to use a custom image for a submit button. Everything seems to work fine (valid email check, return success page) except the email never actually goes through. It only happens when I put in the custom image for the submit button.
Here is the code in the HTML:
[code]
<form name="dform" action="email.php" onsubmit="return validateForm();" method="post">
<input type="hidden" value="[email protected]" name="email" />
<input type="hidden" value="Mailing List Submission" name="subject"/>
<p><input type="text" name="your_email" size="55" class="form_field" style="overflow:hidden;" value="enter email address" >
<br />
<input type="image" name="submit" src="images/submitcheck.png" border="0" align="right" style="margin-top:2px" />
</p>
</form>[/code]
AND HERE IS EMAIL.php
[php]<?php
if(isset($_POST[‘submit’])) {
# Form declarations
$to = "[email protected]";
$subject = "Mailing List Submission";
$from = "Mailing List Submission";
$your_email_field = $_POST['your_email'];
$body = "
Email: $your_email_field\n";
$success = mail($to, $subject, $body, “From: “$name_field” <$your_email_field>”);
}
if ($success){
header(‘Location: http://littleglobalvillage.com/’);
} else {
header(‘Location: http://littleglobalvillage.com/’);
}
?>[/php]
thanks!