Usar el objeto PDO haría esto más fácil, mysql_ es heredado de todos modos:
$db = new PDO($hostname,$username,$password);
$qry = "INSERT INTO table (
Date,
FirstName,
LastName,
StraightHours,
OvertimeHours,
PremiumHours,
TotalHours,
PerDiem
)
VALUES (:date, :firstname, :lastname, :straighthours, :overtimehours, :premiumhours, :totalhours, :perdiem)"; // colon variables will be bound to actual variable
$statement = $db->prepare($query); //prevents injection
// binds variables to place holder in query
$statement->bindValue(':firstname', $firstname);
$statement->bindValue(':lastname', $lastname);
$statement->bindValue(':straighthours', $straighthours);
$statement->bindValue(':overtimehours', $overtimehours);
$statement->bindValue(':premiumhours', $premiumhours);
$statement->bindValue(':totalhours', $totalhours);
$statement->bindValue(':perdiem', $perdiem);
$statement->execute();
$statement->closeCursor();
puede realizar más comprobaciones de entrada con php antes de pasar algo a sql a través de:
trim(strip_tags(htmlentities($firstname)));
PDO es mucho más simple de usar y entender IMO
ACTUALIZAR:
ACTUALIZACIÓN #2:
Para funcionalidad adicional con matrices por día, puede hacer:
<input type="text" name="firstname1">
// do this for all fields then
$workingday1 = array();
$workingday1['firstname'] = $_GET['firstname1'];
// etc. for all the other fields
Luego puede acceder al campo por:
$workingday1 = $_GET['workingDay1']; // or post or however you want to pass it
$firstname = $workingday['firstname'];
Después de eso, puede podar su base de datos como desee. Puede tener una sola tabla con todos los valores y editar sus selecciones para que se muestren por empleado o día o w/e. También puede tener una tabla para cada empleado y luego tomar de esas tablas y mostrar los datos como quiera.