Jump to content


Photo

enqiry form


  • Please log in to reply
3 replies to this topic

#1 jezowen

jezowen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 April 2006 - 10:06 PM

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



#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 April 2006 - 10:35 PM

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.
Legend has it that reading the manual never killed anyone.
My site

#3 jezowen

jezowen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 April 2006 - 10:45 PM

[!--quoteo(post=365717:date=Apr 17 2006, 11:35 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Apr 17 2006, 11:35 PM) View Post[/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 Genius

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 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

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 17 April 2006 - 10:49 PM

[!--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 :)
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users