Hey guys,
I am writing a program to keep track of daily records for my companies technitians.
I have created a form that the supervisor will fill out that allows for a dynamic ammount of techs per shift, that he/she would select. This works fine but when I try to enter the data into the MySQL database I am doing somthing wrong. Can someone take a look at this for me?
//This is the form that creates a field for every technitian
//create an input field for every tech on the shift
for($i=0; $i<$number_of_techs; $i++) {
echo "<tr><td>
<input type='text' name='tech_name$i' size='10'></td>
<td><input type='text' name='tech_absent$i' value='Y,N'></td>
<td><input type='text' name='incoming_dialup$i' size='3'></td>
<td><input type='text' name='incoming_dialup_time$i' size='8' value='00:00:00'></td>
<td><input type='text' name='outgoing_calls$i' size='3'></td>
<td><input type='text' name='contacted_workorders$i' size='3'></td>
<td><input type='text' name='incoming_dsl$i' size='3'></td>
<td><input type='text' name='incoming_dsl_time$i' size='8' value='00:00:00'></td>
<td><input type='text' name='dsl_calls_escalated$i' size='3'></td>
<td><input type='text' name='incoming_web$i' size='3'></td>
<td><input type='text' name='incoming_web_time$i' size='8' value='00:00:00'></td>
<td><input type='text' name='web_calls_escalated$i' size='3'></td></tr>";
}
// this is the code i am trying to use to get all that into the database
// put every techs data into the database
for($i=0; $i<$number_of_techs; $i++) {
$query$i = mysql_query("INSERT INTO shift_report $shift_date$i, $shift_number$i, $tech_name$i, $tech_absent$i, $incoming_dialup$i, $incoming_dialup_time$i, $outgoing_calls$i, $contacted_workorders$i, $incoming_dsl$i, $incoming_dsl_time$i, $dsl_calls_escalated$i, $incoming_web$i, $incoming_web_time$i, $web_calls_escalated$i");
}
thanks!
Ben LeMasurier