jezowen Posted April 17, 2006 Share Posted April 17, 2006 Hi this is my first post. I am not a web programmer, I have a copy of dreamweaver and dabble with webdesign for fun !!I have made a website [a href=\"http://www.highdowncaraudio.com\" target=\"_blank\"]http://www.highdowncaraudio.com[/a] for my business, but i am having problems with getting the php element to redirect the browser to the [a href=\"http://www.highdowncaraudio.com/forms/thanks1.html/\" target=\"_blank\"]thankyou page[/a] . the emails are sent to both parties fine, but the user the ends up with a page displaying"[blockquote]Warning: Cannot modify header information - headers already sent by (output started at /home/highdowcom/public_html/forms/sendmail.php:1) in /home/highdowcom/public_html/forms/sendmail.php on line 12[/blockquote]the php i have used to send the form is:[blockquote]<title>Highdown Car Audio & Security - Enquiry Form</title><? $email = $_REQUEST['email'] ; $title = $_REQUEST['title'] ; $firstname = $_REQUEST['firstname'] ; $surname = $_REQUEST['surname'] ; $telephone = $_REQUEST['telephone'] ; $querietype = $_REQUEST['querietype'] ; $textarea = $_REQUEST['textarea'] ; $referral = $_REQUEST['referral'] ; mail( "enquiryform@highdowncaraudio.com", "You've received a website Enquiry", "You have received an enquiry from \n\n$title $firstname $surname\n\n Telephone: $telephone\n\n e-mail address: $email \n \n $title $surname has an enquiry relating to: $querietype \n \n the enquiry is:\n $textarea \n \n they found us by: $referral", "From: $email" ); mail( "$email","Your enquiry has been received","Dear $title $surname,\nThank you for your enquiry, we will endeavour to reply to your enquiry as soon as possible.\nIf your request is urgent you can call us on the telephone numbers below.\n\nThank You\n\nHighdown Car Audio and Security\n\nTel: 01903 620922 \nMobile: (07817) 694116 \nemail: email@highdowncaraudio.com" ); header( "Location: [a href=\"http://www.highdowncaraudio.com/forms/thanks1.html"\" target=\"_blank\"]http://www.highdowncaraudio.com/forms/thanks1.html"[/a] ); ?>[/blockquote]If anyone has the time to help me, i would really appreciate it thank you Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 17, 2006 Share Posted April 17, 2006 Simply, you cannot have any output to the browser before the header() function. In the script you gave, just delete the title line (and anything above it that you didn't include here). That should fix it. Quote Link to comment Share on other sites More sharing options...
jezowen Posted April 17, 2006 Author Share Posted April 17, 2006 [!--quoteo(post=365717:date=Apr 17 2006, 11:35 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Apr 17 2006, 11:35 PM) [snapback]365717[/snapback][/div][div class=\'quotemain\'][!--quotec--]Simply, you cannot have any output to the browser before the header() function. In the script you gave, just delete the title line (and anything above it that you didn't include here). That should fix it.[/quote]Andy You are a GeniusThank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you !!!!I have been over this time and time again (but I couldn't see the wood for the trees)Once again THANK YOU Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 17, 2006 Share Posted April 17, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]You are a Genius [/quote]Not exactly. I spend time reading here, time looking through the manual, time looking through other people's scripts, and have gradually reduced the number of crazy mistakes I make to manageable proportions :) 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.