Dear PHP Group:
I have finally narrowed my error down. I re-arrange my database and re-wrote the script and received a parse error on line 17.
PHP does not like my TimeStamp Field. I need to set 14 (0s) in the StartDateTime field because I will update this field later.
Here's my code.
$EnrolledDate = date("Y-m-d");
$AllottedTime = 3.00;
$AccumulatedTime = 0.00;
$Email = "vtaylor133@aol.com";
$ItemNo = 154327;
$StartDateTime = 00000000000000; (this is line 17 in my code)
mysql_connect('IP','username','password') or die('Error: Unable to connect to the database server.');
mysql_select_db('conte5') or die('Error: Unable to select proper database.');
srand((double)microtime() * 1000000);
$Password = substr(md5(uniqid(rand())),0,10);
$ExecuteQuery = mysql_query("INSERT INTO Validation VALUES (Null, '$ItemNo', '$Email', '$Password', '$AllottedTime', '$AccumulatedTime', '$EnrolledDate', '$StartDateTime')") or die('Error: Unable to execute insertion query.');
mysql_close();
My question, why does the StartDateTime create parse errors when I run this script? The StartDateTime field data type is
TimeStamp (14) Default '00000000000000' . This should run.
What should I do to make the script run without parse errors.
I need actually script examples not just verbiage.