$_GET removing text after the space.
Posted: Mon Nov 21, 2011 6:47 am
Hi, i have some php code in oen file i have some php filling a combo box
This fills up the combo box with info from a database this works fine with the full names. i also tried echo them as well incase that made any difference but it didn't
so when i use the $_GET to move it from one page to another the three stations City Sqaure, Hyde Park and West Park turn to Cit, Hyde, West when i try to echo them or use thme with anything.
so my conclusion was that the $_GET was messing with them.
is what i am using to echo them. iv'e had a look for answers around but there isn't much on the top and wehat there is doesn't help just wondering if anyone could help.
Code: Select all
<select name ="From">
<?php
for ($j=0; $j < $rows; $j++)
{
$station_name = pg_result($result_set, $j, "station");
$stations[$j] = $station_name;
}
for ($i = 0; $i < $results = count($stations); $i++){
echo "<option value=".$stations[$i].">".$stations[$i]."</option>";
}
?>so when i use the $_GET to move it from one page to another the three stations City Sqaure, Hyde Park and West Park turn to Cit, Hyde, West when i try to echo them or use thme with anything.
so my conclusion was that the $_GET was messing with them.
Code: Select all
To : <?php echo urldecode($_GET["From"]);?>