I have a php script which updates user info. I have created an html form, which allows user to edit the values and enter new ones. Now when the form is loaded for the first time, it displays some default values taken from php variables. The works fine but the problem is with tag.
<input type = "text" name = "name" class = "text" value = "<?php echo $user->name; ?>" />
this works fine..
<select name = "department" value = "<?php echo $user->department; ?>">
<option>Information Technology</option>
<option>Computer Science</option>
<option>Electronics & Communication</option>
<option>Mechanical Engineering</option>
<option>Civil Engineering</option>
<option>Electrical & Electronics Engineering</option>
<option>M.Tech</option>
<option>MBA</option>
<option>MCA</option>
</select>
how can I solve this issue?