Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internal Server error 500 when sending vars

Status
Not open for further replies.

lumberjakel

Programmer
Oct 27, 2001
29
NL
Hi I've got the following script:

Code:
if (!isset($a))
{
  $a="hello\nworld";
  header ("Location: temp.php?a=$a");
}
else echo $a;

this is the whole script but when It runs I get a Internal Server Error. Obviously because PHP.exe screws up somehow.

I figured out that the newline in $a is the problem. when I remove it it all works


Is this a common problem or is it my php version that is causing the trouble???


I just can't see why a newline inside a string needs to cause trouble...
Lumberjakel

Sometimes it's just better to accelerate your computer with 9.8 meters per square second!
 
use $a=rawurlencode("hello\nworld");

it works Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top