My script isn't working: there are no error messages, it does the last line of the script (redirect) but doesn't do the second last line (email). Here are my scripts:
HTML FORM:
HTML Code:
<form action="contact-form.php" method="POST">
<table>
<tr>
<td>
Subject
</td>
<td>
<input type="text" name="sub">
</td>
</tr>
<tr>
<td>
Your Name
</td>
<td>
<input type="text" name="name">
</td>
</tr>
<tr>
<td>
Your E-mail
</td>
<td>
<input type="text" name="email">
</td>
</tr>
<tr>
<td valign="top">
Message
</td>
<td>
<textarea rows="6" cols="30" name="msg"></textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Send!">
</td>
</tr>
</table>
</form>
PHP SCRIPT:
PHP Code:
<?php
$sub = $_POST["sub"];
$name = $_POST["name"];
$email = $_POST["email"];
$msg = $_POST["msg"];
mail("contact@stuff4web.co.uk",$sub,$msg,"From: $email");
header("Location: contact.php?d=1");
?>