Page 1 of 1

What would cause my broken url??

Posted: Wed Apr 21, 2004 9:48 pm
by bassphreek
One of my pages is sending broken information. There is a form that generates a list of names with radio buttons next to them. The user selects a name and clicks submit .... then the page proceedes to the next one where I do all my database manipulation.

The problem is, when i select a man and hit submit, my link comes out all messed up. Instead of getting

&information="Lastname, Firstname"
...I get
&information="Lastname, "

I have used this technique on many of my other pages for this website. All the other variables that I pass are ok. This is the only one i have an issue with. Please help me. Im balding as it is, I don't need to start pulling out what hair I have left. Thanks

i got it!

Posted: Wed Apr 21, 2004 10:00 pm
by bassphreek
it was just one huge brain fart!!!!

i had this

Code: Select all

<?php
echo "  <td><input type="radio" name="player" value=$goalie><td></tr>\n";
?>
i needed this

Code: Select all

<?php
echo "  <td><input type="radio" name="player" value="$goalie"><td></tr>\n";
?>
Quotation marks will soon be the death of me!

Posted: Wed Apr 21, 2004 10:15 pm
by Illusionist
... I'm guesing your passing these throught eh URL using the GET method. And It looks like there is a space after taht comma. And if you are using Apache, then everything after a space in the QUERY_STRING gets pushed back into SERVER_PROTOCOL. So you have two choices... You can
1)Get the remainder of the name by doing something similar to:

Code: Select all

$name = substr(getenv('SERVER_PROTOCOL'), 0, strpos(getenv('SERVER_PROTOCOL'), " HTTP"));
or 2) Change the Name to soemthing like LASTNAME,_FIRSTNAME, then once you get it fromt he URL replace teh _ with a space....

Posted: Wed Apr 21, 2004 10:17 pm
by Illusionist
oh ya, forgot to mention that i had a simlar problem, thats why i know that! and know one else here probably does...
viewtopic.php?t=17798&postdays=0&postorder=asc&start=0