okay, without looking at your code, it shouldnt be so difficult. simply organize your code so that the options can be generated by your query, as i'm sure you have already, but just for the sake of clarity:
function makelist(){
$query=mysql_query("select * from person");
$count=mysql_num_rows($query);
for ($i=0; $i<$count; $i++){
$name=mysql_result($query, $i, 'Pname');
$id=mysql_result($query, $i, 'Pid');
echo "
<option value='$id'>$name</option>";
}
}
function write(){
global $id;
///--- note, i dont know what the values of edate and enote are -- -///
$write=mysql_query("UPDATE EVENT set
PID = '$id' Edate= '$Edate' Enote= '$Enote' WHERE EID = '$EID' ");
---- NOTE I dont where you wanna update your records, or if you just want to insert a record, make an insert command like so : ("INSERT into EVENT values (NULL, '$id', '$edate', '$enote'");----
if (!$write) echo ("ERROR");
else echo "OkaY!";
}
THE FORM:::
function form(){
echo "
<form action='$PHP_SELF?do=write' method=post/get>
<select name='id'>";
makelist();
echo " </select><input type=submit value='submit'></form>
}
THE FUNCTION:
if ((isset($do)) AND ($do == 'write'))
write();
else form();
hope this helps. let me know if you need furture assistance, i kind of got lost in the middle of writting this