Need a single MySQLi drop down select list to insert multiple columns from one table into a form
This is a drop down that I currently have, and it's working fine.
<td width="398"><label for="Event">Event:
<select name="Event" id="Event">
<?php
while(!$Event->atEnd()) { //dyn select
?>
<option value="<?php echo($Event->getColumnVal("id")); ?>"<?php if (!(strcmp($Event->getColumnVal("id"), ($Event->getColumnVal("id"))))) {echo "selected=\"selected\"";} ?>><?php echo($Event->getColumnVal("event")); ?></option>
<?php
$Event->moveNext();
}
$Event->moveFirst(); //return RS to first record
?>
</select>
</label></td>
However, I need to insert the values from 2 other columns (start_time & end_time) in this table that correspond with the selected record when the form is submitted. I want those values to be hidden but they need to change along with the selected value in the drop down.
How can I do that?
The query is:
<?php
$Event = new WA_MySQLi_RS("Event",$local_i,0);
$Event->setQuery("SELECT kids_program_events.* FROM kids_program_events");
$Event->execute();?>