Hey guys,
I am struggling with an image verification… Im almost positive everything is right however when i submit the form it brings up the error code If anyone could help me out that would be great!
PHP code:
[php]
Name is required!
"; } if(!$email){ $error = 1; $msg .= "Email is required!
"; } if(!$subject){ $error = 1; $msg .= "Subject is required!
"; } if(!$phone){ $error = 1; $msg .= "Contact Number is required!
"; } if(!$_POST['message']){ $error = 1; $msg .= "Message is required!
"; } if ($_POST["number"] != $_SESSION["number"] OR $_SESSION["number"]==''){ $error = 1; $msg .= "Verification does not match!
"; } if($error == 0){ mail($to, "Message from website", $message, "From: $name"); echo "Message sending successful! We will be in contact soon.
"; }else{ echo $msg; } } } ?>[/php]
Form:
<form name="contact_form" method="POST">
<p>Full Name:</p>
<p><input type="text" name="fullname" class="inputstyle" /></p>
<p>Subject:</p>
<p><input type="text" name="subject" class="inputstyle" /></p>
<p>Contact Number:</p>
<p><input type="text" name="phone" class="inputstyle" /></p>
<p>Email Address:</p>
<p><input type="text" name="email" class="inputstyle" /></p>
<p>Message:</p>
<p><textarea name="message" class="messageinput"></textarea></p>
<!--<p>Image Verification:</p>
<p><img src="image.php" /> : <input name="number" type="text" class="inputstyle"></p>
<p>(Copy what you see on the image above)</p>-->
<p><input type="submit" name="go" value="Send" class="submitButton" />
</form>
image.php
[php]
[/php]