che_anj
11-14-2007, 01:01 PM
why I cant post or get the value of the select box that i choose when click button.
Heres my code.
<form name="adfdf" method="post">
<select name="clientss">
<?
while($crow=mysql_fetch_array($qresults)){
if($_GET['clientss']==$crow[employer_name]- $crow[employer_id])
echo "<option value=$crow[employer_name]- $crow[employer_id] selected>$crow[employer_name]</option>";
else
echo "<option value=$crow[employer_name]- $crow[employer_id]>$crow[employer_name]</option>";
}
?>
</select>
<tr><td colspan="2"><input type="submit" name="go" value="Show Report"></td></tr>
</form>
if(isset($_POST['go'])) {
$clientss=$_POST['clientss'];
echo $clientss ----------- I wish to get the value of the select box when clicking the submit button
}
thanksss
Heres my code.
<form name="adfdf" method="post">
<select name="clientss">
<?
while($crow=mysql_fetch_array($qresults)){
if($_GET['clientss']==$crow[employer_name]- $crow[employer_id])
echo "<option value=$crow[employer_name]- $crow[employer_id] selected>$crow[employer_name]</option>";
else
echo "<option value=$crow[employer_name]- $crow[employer_id]>$crow[employer_name]</option>";
}
?>
</select>
<tr><td colspan="2"><input type="submit" name="go" value="Show Report"></td></tr>
</form>
if(isset($_POST['go'])) {
$clientss=$_POST['clientss'];
echo $clientss ----------- I wish to get the value of the select box when clicking the submit button
}
thanksss