Okay, so I have a PHP script which is a contact form (as shown below)
$body = "From: $name
E-Mail: $email
Message:
$message";
if ($_POST['submit']) {
if ($name != '' && $email != '') {
if ($human == '4') {
if (mail ($to, $subject, $body, $from)) {
echo '<p>Your message has been sent!</p>';
} else {
echo '<p>Something went wrong, go back and try again!</p>';
}
} else if ($_POST['submit'] && $human != '4') {
echo '<p>You answered the anti-spam question incorrectly!</p>';
}
} else {
echo '<p>You need to fill in all required fields!</p>';
}
}
?>
And I was wondering (since I'm not very experienced in PHP) if there was a way to bring me back to the div where the contact form is if there was an error? Thanks in advance EDIT: HTML CODE: http://pastebin.com/CwXsDapB