Hey, I've got some code here that puzzles me. I'm putting together a
url based on user input. Should be pretty straightforward , but there's
a problem. First, here's my code.
---
$myurl="write.p hp?T1=" . $_GET["T1"] . "&T2=" . $_GET["T2"] . "&T3=" .
$_GET["T3"] . "&T4=" . $_GET["T4"] . "&T56=" . $_GET["T56"] . "&T7=" .
$_GET["T7"] . "&T89=" . $_GET["T89"] . "&T10=" . $_GET["T10"] . "&T11="
.. $_GET["T11"];
echo $myurl;
echo "<a href=\"" . $myurl . ">OK - Next Step >>" .
"</a>";
---
** Please note that the 3 lines with the $_GET variables are really on
1 line.
So, that makes my link fine. The problem is my output:
write.php?T1=Wo rd1
Word2
It takes spaces in the $_GET["T1"] and for some reason makes them into
new lines....... which throws off my url completly because it's then
sending you to write.php?T1=Wo rd1, dropping word2 and the rest of the
get variables.
Why is this??
Please help. Sorry if this wasn't clear, but it's a bit confusing, and
I'll try to clarify it if you need more.
Thanks,
iwp506@gmail.co m
url based on user input. Should be pretty straightforward , but there's
a problem. First, here's my code.
---
$myurl="write.p hp?T1=" . $_GET["T1"] . "&T2=" . $_GET["T2"] . "&T3=" .
$_GET["T3"] . "&T4=" . $_GET["T4"] . "&T56=" . $_GET["T56"] . "&T7=" .
$_GET["T7"] . "&T89=" . $_GET["T89"] . "&T10=" . $_GET["T10"] . "&T11="
.. $_GET["T11"];
echo $myurl;
echo "<a href=\"" . $myurl . ">OK - Next Step >>" .
"</a>";
---
** Please note that the 3 lines with the $_GET variables are really on
1 line.
So, that makes my link fine. The problem is my output:
write.php?T1=Wo rd1
Word2
It takes spaces in the $_GET["T1"] and for some reason makes them into
new lines....... which throws off my url completly because it's then
sending you to write.php?T1=Wo rd1, dropping word2 and the rest of the
get variables.
Why is this??
Please help. Sorry if this wasn't clear, but it's a bit confusing, and
I'll try to clarify it if you need more.
Thanks,
iwp506@gmail.co m
Comment