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
What would cause my broken url??
Moderator: General Moderators
-
bassphreek
- Forum Newbie
- Posts: 4
- Joined: Fri Apr 02, 2004 12:40 pm
-
bassphreek
- Forum Newbie
- Posts: 4
- Joined: Fri Apr 02, 2004 12:40 pm
i got it!
it was just one huge brain fart!!!!
i had this
i needed this
Quotation marks will soon be the death of me!
i had this
Code: Select all
<?php
echo " <td><input type="radio" name="player" value=$goalie><td></tr>\n";
?>Code: Select all
<?php
echo " <td><input type="radio" name="player" value="$goalie"><td></tr>\n";
?>-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
... 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:
or 2) Change the Name to soemthing like LASTNAME,_FIRSTNAME, then once you get it fromt he URL replace teh _ with a space....
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"));-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
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
viewtopic.php?t=17798&postdays=0&postorder=asc&start=0