hello friends...i need ur help . I have created a edit page...the current page show the information of that particular person. Later on, can you help me how to put the update query..?
code:--
<form method='post' action='edit_advisor.php'>
<?php
$user_id=$_GET['faculty_id'];
$sql="SELECT * FROM f_advisor WHERE user_id='$user_id'";
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
?><h3>Edit Advisor
<table cellpadding=11 cellspacing=5 border=0>
<tr><td><b>Select Advisor Type</td>
<td><table cellpadding=5 cellspacing=5 border=0><tr><td><input type=checkbox name="s[freshman]" value=1 <?php if ($rows['freshman'] == 1) {echo "checked";} ?>>Freshman</input></td>
<td><input type=checkbox name="s[concentration_major]" value=1 <?php if ($rows['concentration_major'] == 1) {echo "checked";} ?>>Concentration/Major</input></td>
<td><input type=checkbox name="s[coop]" value=1 <?php if ($rows['coop'] == 1) {echo "checked";} ?>>Coop</input></td>
<td><input type=checkbox name="s[program_advisor]" value=1 <?php if ($rows['program_advisor'] == 1) {echo "checked";} ?>>Program Advisor</input></td>
<td><input type=checkbox name="s[doctoral_thesis_advisor]" <?php if ($rows['doctoral_thesis_advisor'] == 1) {echo "checked";} ?>>Doctoral Thesis Advisor</input></td>
</td></tr></table></td>
</tr>
<tr><td><b>Note</td>
<td><table cellpadding=5 cellspacing=5 border=0><tr><td><input name="s[note]" type="text" id="note" value="<? echo $rows['note']; ?>"></td>
</td></tr></table></td>
</tr>
<tr><td><b>Type</td>
<td><table cellpadding=5 cellspacing=5 border=0><tr><td><input type=checkbox name="s[internal]" value=1 <?php if ($rows['internal'] == 1) {echo "checked";} ?>>Internal</input></td>
<td><input type=checkbox name="s[external]" value=1 <?php if ($rows['external'] == 1) {echo "checked";} ?>>External</input></td>
</td></tr></table></td>
</tr>
<td><input type='button' name='update' ></td>
<? mysql_close();
?></form>