• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set_select(), set_radio() mark all the options as selected

#1
[eluser]veledrom[/eluser]
Hi,

I am using set_select(), set_radio() etc with third parameter to auto-select options but unfortunately all the options are marked as "selected".

Any idea?

Thanks


php code
Code:
$session_status = "B";

<select name="select_status" class="input_text">
<option value=""></option>
<option value="A" &lt;?php echo set_select('select_status', $session_status, ($session_status == 'A') ? true : false); ?&gt;>A</option>
<option value="B" &lt;?php echo set_select('select_status', $session_status, ($session_status == 'B') ? true : false); ?&gt;>B</option>
<option value="C" &lt;?php echo set_select('select_status', $session_status, ($session_status == 'C') ? true : false); ?&gt;>C</option>
</select>

html code
Code:
<select name="select_status">
<option value=""></option>
<option value="A"  selected="selected">A</option>
<option value="B"  selected="selected">B</option>
<option value="C"  selected="selected">C</option>
</select

Visual result on the screen
Option C is selected.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.