I put this on my server to check for any parse errors before posting it, so I know that's not the problem.
I'm almost 90% sure the problem will be with the mail() function. You can try turning error reporting on, and then putting a die statement before the redirect:
You might not want to do this on the live site, as other users will be able to see the error.PHP Code:<?php
error_reporting(E_ALL);
/* Step 1 - Check to see whether the user has submitted the form */
if (isset($_POST['submit'])) {
/* Step 2 - Check that the user has input something for their email */
// Using $email so it's easier to write
// The trim() function takes off any whitespace from the string
$email = trim($_POST['email']);
if (!empty($email)) {
/* Step 3 - Email isn't empty, send email */
// The email address to send to
$to = 'mailinglist@onlyjoe.co.uk';
// Message subject
$subj = 'ADD TO ONLYJOE MAILING LIST';
// Message content
$msg = $email . ' would like to be added to your mailing list.';
$headers = "From: Mailing List <mailinglistonlyjoe@gmail.com>";
/* Step 4 - Send the email */
if (mail($to, $subj, $msg, $headers)) {
/* Redirect to success page if mail sent */
header('Location: http://web.me.com/grimshawa/onlyjoe.co.uk_Coming_Soon/Thanks.html');
} else {
die;
/* Redirect to a different page or do something else if it fails */
header('Location: http://web.me.com/grimshawa/onlyjoe.co.uk_Coming_Soon/Error.html');
}
}
}
?>
Let me know what you get from this.

