When I add a new record or try to edit a record, my DATE field seems to be updating, but when I pull the data from that field, it's the default 0000-00-00.
I don't get any errors on the insert or update statements (unless I try to feed it unformatted garbage), and the date is there, so why isn't it updating when all the other fields are?
<?php
$MyDate = Date("Y-d-m");
include("../admin_area/connections.inc");
$thesql = "insert into recipes (SubmitterName, SubmitterEmail, RecipeTitle, Ingredients, Instructions, PrepTime, CookTime, Servings, Categories, TheDate, Approval) values ('$SubmitterName', '$SubmitterEmail', '$RecipeTitle', '$Ingredients', '$Instructions', '$Prep $ptime', '$Cook $ctime', '$Servings', '$Categories_list', $MyDate, 'x')";
echo "<p>$thesql</p>";
$sqlresult = mysql_query($thesql,$connection) or die("Could not connect.");
?>
The resulting sql string looks something like this:
insert into recipes (SubmitterName, SubmitterEmail, RecipeTitle, Ingredients, Instructions, PrepTime, CookTime, Servings, Categories, TheDate, Approval) values ('Amanda Huber', 'ahuber@vulcancreative.com', 'My new recipe submitted on June 23rd', '1 cup this 2 cups that 3 tsp. stuff', 'instructions go here.', '20 minutes', '35 minutes', '4', 'snacks', 2005-23-06 , 'x')
So. No errors, the date is there, but when I pull the record, it's still the default 0000-00-00.
Any idea what's going on? Please tell me I've just got a variable named wrong or something.