Select box value is stoping at space
Posted: Wed Apr 28, 2010 10:42 am
I have no idea why this is happening but when I select a select box value from the box , the value that gets stored in the post variable stops at the space.
This select box:
The select box is getting generated properly but when I submit the page for a selected value of "Human Resources"...
The $_POST['forward_to'] variable would be "Human ".
This select box:
Code: Select all
$d = "SELECT * FROM DEPARTMENTS";
$p = ociparse($cisConnection, $d);
ociexecute($p);
$d_nr = ocifetchstatement($p, $d_results);
echo "<select id=\"forward_to\" name=\"forward_to\">";
for ($d2=0; $d2 < $d_nr; $d2++ ){
$department = $d_results['DEPARTMENT'][$d2];
echo "<option style='padding:1px;' value=".$department.">" . $department ."</option>";
}
echo "</select>";
The $_POST['forward_to'] variable would be "Human ".