Hi
I am retrieving values from database for edit profile...
I have one query ..... i.e.
Based on department Id in database i am showing selected value in drop down box.... but while inserting how to insert department id.
$data = @mysql_query("select * from Department");
$array = array();
while ($row = mysql_fetch_assoc($data))
{
$id = $row['dept_id'];
$dname = $row['department_name'];
echo '<option value='.$did.'>'.$dname.'</option>'."\n";
}
In above code $did is selected value from database..... but while inserting how to get $id .......can we write to values in option field?
Thanks in advance