Jump to content

Header failing with GET


brad_langdon

Recommended Posts

Firstly the code with the issue is as follows...

 

header( "Location:../index.php?validate=failed" ."&name=$name"."&phone=$phone" ."&email=$email" ."&enquiry=$enquiry"  );

 

It works fine unless the last variable ( $enquiry ) has more than one line of text.

If the user only types one line of text into the enquiry field it works fine but as soon as they have a line break by pressing enter I get the following error...

 

Warning: Header may not contain more than a single header, new line detected. in /home/brad_langdon/vander.co.nz/HeatPump/inserts/sendmail.php on line 52

 

Please Note: I am using POST to get the form data to the processing page. I am just using GET to get the data back to the form page if it does not validate so that the user does not have to re enter everything.

 

Also the problem is not having more than one variable in the header as I have checked this.

 

Thanks to anyone in advance who can help  :o

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.