hello friends,
i want to store combo box value using php and i have written a code like this
<tr>
<td><b>Task Status :</b></td>
<td>
<?php echo $status; ?>
<select name="status">
<option value="juststarted" <? if($status=="juststarted"){echo "SELECTED";}else{ echo "fail" ; } ?>>Just Started</option>
<option value="halfcompleted" <? if($status=="halfcompleted"){echo "SELECTED";} else{ echo "fail" ; } ?>>Half Completed</option>
<option value="almostcompleted" <? if($status=="almostcompleted"){echo "SELECTED";} else{ echo "fail" ; } ?>>Almost Completed</option>
<option value="completed" <? if($status=="completed"){echo "SELECTED";} else{ echo "fail" ; } ?>>Completed</option>
</select>
</td>
</tr>
but still it is not working properly and not showing the selected value.............pls solve the problem.........thanx in advance
storing combo box value using PHP
Moderator: General Moderators
Re: storing combo box value using PHP
can anybody reply to this problem ??????????
hello friends,
i want to store combo box value using php and i have written a code like this
<tr>
<td><b>Task Status :</b></td>
<td>
<?php echo $status; ?>
<select name="status">
<option value="juststarted" <? if($status=="juststarted"){echo "SELECTED";}else{ echo "fail" ; } ?>>Just Started</option>
<option value="halfcompleted" <? if($status=="halfcompleted"){echo "SELECTED";} else{ echo "fail" ; } ?>>Half Completed</option>
<option value="almostcompleted" <? if($status=="almostcompleted"){echo "SELECTED";} else{ echo "fail" ; } ?>>Almost Completed</option>
<option value="completed" <? if($status=="completed"){echo "SELECTED";} else{ echo "fail" ; } ?>>Completed</option>
</select>
</td>
</tr>
but still it is not working properly and not showing the selected value.............pls solve the problem.........thanx in advance[/quote]
hello friends,
i want to store combo box value using php and i have written a code like this
<tr>
<td><b>Task Status :</b></td>
<td>
<?php echo $status; ?>
<select name="status">
<option value="juststarted" <? if($status=="juststarted"){echo "SELECTED";}else{ echo "fail" ; } ?>>Just Started</option>
<option value="halfcompleted" <? if($status=="halfcompleted"){echo "SELECTED";} else{ echo "fail" ; } ?>>Half Completed</option>
<option value="almostcompleted" <? if($status=="almostcompleted"){echo "SELECTED";} else{ echo "fail" ; } ?>>Almost Completed</option>
<option value="completed" <? if($status=="completed"){echo "SELECTED";} else{ echo "fail" ; } ?>>Completed</option>
</select>
</td>
</tr>
but still it is not working properly and not showing the selected value.............pls solve the problem.........thanx in advance[/quote]
Re: storing combo box value using PHP
wats the problem with the above code why it is not showing the selected value in combo box
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: storing combo box value using PHP
You already have an active thread on this exact subject:
viewtopic.php?f=1&t=84100&start=0&st=0&sk=t&sd=a
viewtopic.php?f=1&t=84100&start=0&st=0&sk=t&sd=a
Re: storing combo box value using PHP
This topic is locked. Duplicate (several) posts, probably wrong forum, too.