Wednesday, 11 September 2013

cant retrieve data from select box while using its id

cant retrieve data from select box while using its id

this is my select tag but in the grid while editing and adding i cannot
retrieve country value only code value appears what shall i do nw?
<option value="" >select country</option>
<?php $select_query= mysql_query("Select * from country");
while($select_query_array = mysql_fetch_array($select_query))
{
?>
<option value="<?php echo $select_query_array['code'];?>" <?php
if($_POST['country']==$select_query_array['code']) { ?>
selected="selected" <?php } ?> > <?php echo
$select_query_array['country']; ?> </option>
<?php } ?>
</select>

No comments:

Post a Comment