I have following code
<select name="status_drop" id="status" selected="<%=session[:status]%>" >
<option value="0">Completed</option>
<option value="1">Not Completed</option>
</select>
I have session call session[:status] it hold either 1 or 0 and I need to set default value according to the session[:status] value. Please can some one help on this problem ?
You can try that