I am sure my solution is not the most elegant, but this is what I did:
<?
switch($acc_state){
case "0":
$st0 = selected;
break;
case "AL":
$stAL = selected;
break;
.....
print "<SELECT size=1 tabindex=11 name=accstate>
<option value=\"0\" $st0 ></option>
<option value=\"AL\" $stAL >ALABAMA</option>
....
?>
""Hasbullah Pit (sebol)"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have this one :-
>
> <select name="jenis_biasiswa">
> <option selected>Penuh</option>
> <option>Separuh</option>
> <option>Sendiri</option>
> </select>
> and a field of table which contained with
> 'Penuh' OR 'Separuh' OR 'Sendiri'
>
> I want to make it Ither one is 'selected' during a particular time.
> i'm thinking of having something like this:-
>
>
> <select name="jenis_biasiswa">
> <option <? function_that_determine_it_selected_or_not(Penuh)?>
> >Penuh</option>
> <option <? function_that_determine_it_selected_or_not(Separuh)?>
> >Separuh</option>
> <option <? function_that_determine_it_selected_or_not(Sendiri)?> >
> Sendiri</option>
> </select>
>
> Is that any prebuild/example funtion for that
> function_that_determine_it_selected_or_not(Sendiri) then print
> "Selected" ?
>
> thanks in advance
>
>
> --
> Hasbullah Bin Pit (sebol) http://ikhlas.com
>
> " Melihat keadaan sistem kehakiman sekarang ini,
> Saya tak hairan kalau saya disabitkan dengan kesalahan
> 'Menceraikan isteri di luar mahkamah' ketika saya masih bujang"
> - Hasbullah Pit -
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]