For example, the options in the drop down list are the contents of the event column (9am Service, 11am Service...). If "9am Service" is selected when the form is submitted, I need to enter the event_id (1), start_time (08:30:00), and end_time (10:30:00) for that record into 3 columns the on the table the form is inserting a record to (all based off of the 1 selection).
Here's what the insert looks like currently.
<?php
if ((((isset($_POST["Submit"]))?$_POST["Submit"]:"") != "")) {
$InsertQuery = new WA_MySQLi_Query($local_i);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "calendar_events";
$InsertQuery->bindColumn("name", "s", "".((isset($_POST["UserID"]))?$_POST["UserID"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("start_date", "s", "".((isset($_POST["start_date"]))?$_POST["start_date"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("end_date", "s", "".((isset($_POST["start_date"]))?$_POST["start_date"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("repeats", "s", "".((isset($_POST["RecurType"]))?$_POST["RecurType"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("repeat_every", "i", "".((isset($_POST["Frequency"]))?$_POST["Frequency"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("repeat_on", "i", "".((isset($_POST["RecurOn"]))?$_POST["RecurOn"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("occurrence", "s", "".((isset($_POST["Occurrence"]))?$_POST["Occurrence"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("occurrence_end", "s", "".((isset($_POST["ends_on"]))?$_POST["ends_on"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("type", "s", "person", "WA_DEFAULT");
$InsertQuery->bindColumn("attribute", "s", "".((isset($_POST["Room"]))?$_POST["Room"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("attribute_2", "s", "".((isset($_POST["Position"]))?$_POST["Position"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("calendar_id", "i", "1", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "eventcal.php";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>
I may be severely over complicating this, but for some reason I can't seem to wrap my head around it.