brad_langdon Posted July 30, 2009 Share Posted July 30, 2009 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 Quote Link to comment Share on other sites More sharing options...
p2grace Posted July 30, 2009 Share Posted July 30, 2009 Instead of saving the data back through $_GET, use $_SESSION vars. Quote Link to comment Share on other sites More sharing options...
brad_langdon Posted July 30, 2009 Author Share Posted July 30, 2009 I have had issues using seesion vars with headers before by not being consistent and I would rather use this method. Does anyone know how to fix this header problem? 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.