the php is suposed to load a page saying thank you for your message and then redirect the page back to the home page.
is somebody would be so kind as to have a look and at least point me in the right direction it would be much appreciated.
the page in question is http://www.hardkase.co.uk/contact.html
thanks in advance guys
HTML code
- Code: Select all
<div id="contactform">
<form action="contactform.php" method="post">
<div class="row">
<div class="label"><span>YOUR NAME *</span></div>
<div class="input"><input type="text" id="name" class="contactdetail" name="name" value=""/>
</div><!-- end input -->
</div><!-- end row-->
<div class="row">
<div class="label"><span>E-MAIL ADDRESS *</span></div>
<div class="input">
<input type="email" id="email" class="contactdetail" name="email" value=""/>
</div><!-- end input -->
</div><!-- end row-->
<div class="row">
<div class="label"><span>YOUR MESSAGE *</span></div>
<div class="input">
<textarea id="message" name="message" class="mess"></textarea>
</div><!-- end input -->
</div><!-- end row-->
<div class="submit">
<input name="submit" type="submit" id="submit" onClick="MM_validateForm('fullname','','R','email','','RisEmail','message','','R');return document.MM_returnValue" value="Send"/>
</div>
</form>
</div><!--ends form-->
PHP CODE: (dummy e-mail address)
- Code: Select all
<?
/* Subject and Email Variables */
$emailSubject = 'Contact Form';
$webMaster = 'name@email.com';
/* Gathering Data Variables */
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Message: $message <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Message Sent!</title>
<meta http-equiv="refresh" content="3;URL=http://www.hardkase.co.uk/">
<style type="text/css">
#text { margin: auto; }
body { width: 100%; height: 100%; background: black;}
h1, h2 {color: white;}
</style>
</head>
<div id="text"><h1>Thank you for your message.</h1>
<h2>Your request will be dealt with as soon as possible.</h2>
</div>
</body>
</html>
EOD;
?>



