I am doing a web application and it involves two types of login classes. The thing is i want the classes to be selected by the radio button selection after which i use a continue button to log into my site. The following is a sample code that uses radio button to select my php classes, but it doesn't even echo the sentences, do correct the code.
<FORM METHOD ="POST" >
<label> <input type="radio" name="user" value="Doctor" /><?php if (isset($_POST['user']) && $_POST['user'] == 'Doctor') {
echo 'checked="checked"';} ?><i></i> Doctor
</label>
<label> <input type="radio" name="user" value="User" /> <?php if (isset($_POST['user']) && $_POST['degree_type'] == 'user') {
echo 'checked="checked"';} ?><i></i> User
</label>
</FORM>
Write checked inside the input tag, currently its outside. And may be the conditions don't match so its not echoing anything. Please check conditions again.