Hello I have a employee training database and need to be able to add and update employees to it. I had it working and made a few changes and now it doesn't insert data into the database and i can't figure out what happened. (all I did was add some more fields) I get no error just a blank white page. First I need to get it to add a new employee working again.
Here is what I have.
TrainingDataBaseAdd.php File:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ADD a NEW EMPLOYEE Training Record</title>
<meta name="keywords" content="HTML, CSS, PHP" /> </meta>
<link rel="stylesheet" type="text/css" href="TrainingDataBase.css">
</head>
<body>
<br>
<br>
<!-- ADD NEW EMPLOYEE and TRAINING -->
<h1 align="center"><u><strong><font face="arial">Add New Employee Training Record</font></strong></u></h1>
<br>
<h3 align="center"><strong><font face="arial">PLEASE FILL IN <u>EVERY</u> BOX</font></strong></h3>
<br>
<h2 align="center"><u><strong><font face="arial">Add New Employee Information</font></strong></u></h2>
<br>
<form action="AddTraining.php" method="post">
Please enter a EMPLOYEE NUMBER:
<input type="text" name="Emp_Id" />
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter a FIRST NAME: <input type="text" name="FirstName" />
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter a LAST NAME: <input type="text" name="LastName" />
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter a DEPARTMENT: <input type="text" name="Dept" />
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter a SHIFT: <input type="text" name="Shift" />
<br>
<br>
<br>
<h2 align="center"><u><strong><font face="arial">Add New Quality Training</font></strong></u></h2>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of ISO 13485 Internal Audit Training: <input type="text" name="iso13485" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of ISO 9001 Training: <input type="text" name="iso9001" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of QUALITY Training: <input type="text" name="quality" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of DHR Training: <input type="text" name="dhr" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of ORIENTATION: <input type="text" name="orientation" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of WORK INSTRUCTIONS Training: <input type="text" name="workinstructions" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<form action="AddTraining.php" method="post">
Please enter the date of 6S Training: <input type="text" name="6S" /> example: mm/dd/yyyy OR 0 for NO Training
<br>
<br>
<br>
<br>
<center><input type="submit" value="Add New Employee"></center>
</form>
<br>
<br>
</body>
</html>
Here is the AddTraining.php File:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Employee Has Been Added to Database</title>
<meta name="keywords" content="HTML, CSS, PHP" /> </meta>
<link rel="stylesheet" type="text/css" href="TrainingDataBase.css">
</head>
<body>
<div align="center">
<br>
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("training_db", $con);
// Employee Data Variables
$Emp_Id = $_POST['Emp_Id'];
$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
$Dept = $_POST['Dept'];
$Shift = $_POST['Shift'];
// Quality Data Variables
$iso13485 = $_POST['iso13485'];
$iso9001 = $_POST['iso9001'];
$quality = $_POST['quality'];
$dhr = $_POST['dhr'];
$orientation = $_POST['orientation'];
$workinstructions = $_POST['workinstructions'];
$6S = $_POST['6S'];
// Insert Data Into Database Tables
mysql_query(INSERT INTO employee('Emp_Id',
'FirstName',
'LastName',
'Dept',
'Shift'
)
VALUES ('$Emp_Id',
'$FirstName',
'$LastName',
'$Dept',
'$Shift'
));
mysql_query(INSERT INTO quality('Emp_Id',
'iso1348',
'iso9001',
'quality',
'dhr',
'orientation',
'workinstructions',
'6S'
)
VALUES ('$Emp_Id',
'$iso13485',
'$iso9001',
'$quality',
'$dhr',
'$orientation',
'$workinstructions',
'$6S'
));
mysql_close($con);
?>
<h3 align="center"><u><strong><font face="arial"><?php echo $FirstName." ".$LastName;
?> Has Been Added to Database</font></strong></u></h3>
<br>
<br>
</div>
</body>
</html>
Thanks for any and all help.