kim_foxx
Member
- Messages
- 84
- Reaction score
- 0
- Points
- 6
Im using a simple mail script as a template but instead of echoing the message i want it to link to another page so i can keep my layout and css
The code at the moment which i want to change is
and the form:
The code at the moment which i want to change is
PHP:
$to = 'dadadada@hotmail.com';
$subject = "Message from " . $_POST['name'];
$message = $_POST['comment'];
$headers = "From: " . $_POST['email'] . "\r\n" .
"Reply-To: ".$_POST['name'] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
echo "Your comment has been sent! Thanks!";
}
and the form:
HTML:
<form method="post">
<p>Name:</p>
<p><input type="text" name="name"></p>
<p>Email Address:</p>
<p><input type="text" name="email"></p>
<p>Comment/Suggestion:</p>
<p><textarea cols="40" name="comment"></textarea></p>
<p><img src="captcha.php"/></p>
<p>lease enter the image text:</p>
<p><input type="text" name="code">
<input type="submit" value="Submit Form" />
<input type="hidden" name="form_submitted" value="1"/>
</form></p>
Last edited: