niadev Posted February 28, 2008 Share Posted February 28, 2008 I've just created a Contact Us form where users can email me from a website I created: www.greencastleparish.com/contactusbackup.htm. As you can see I have provided users with the option to attach a file to send to me. The problem is that when I test it I can receive the email ok, but there are no attachments. Here's the PHP script: <?php $formurl = "http://www.greencastleparish.com/contactusbackup.htm" ; $thankyouurl = "http://www.greencastleparish.com/thankyou.htm" ; $uself = 0; $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $name = $_POST['Name'] ; $telephone = $_POST['Telephone'] ; $email = $_POST['Email'] ; $comments = $_POST['Questions/comments'] ; $http_referrer = getenv( "HTTP_REFERER" ); $subject = "New comment from $name"; $message = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n\n" . "Name: $name\n" . "Email: $email\n" . "Telephone: $telephone\n" . "------------------------- COMMENTS -----------------------\n\n" . $comments . "\n\n------------------------------------------------------------\n" ; mail("nialldevlin@hotmail.com", $subject, $message, "FROM: info@greencastleparish.com" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ; ?> Niall Quote Link to comment Share on other sites More sharing options...
niadev Posted March 6, 2008 Author Share Posted March 6, 2008 Anyone? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.