I've used the following command, is it correct?
<input type="hidden" name="date" value="<?php echo date("d M, Y") ?>">
I was hoping that when the user submits the form, the date in the format of 11 Dec, 2000 would be enter to MySQL, but nothing shows up in the database.
The date field in MySQL is set to VARCHAR (14) not null
if i am not wrong date field in mysql is something like this
No, since Robo used VARCHAR(14) and not the date of MySQL
Robo, test the hidden field if it produces the correct format (view src), I believe it is.
If it's the correct format then the problem will be at the part you enter the data into your DB. You should post the code here so we could help.
Got it sorted, seems that the script didn't like where I put the command, shifted the line and it worked...
Now I have another small question, what would I need to do so that I can have a created date? So the date is the first time the recorded is added, and it doesn't change, the function I have now changes everytime someone edits the record.
It's probably really simple, just can't think...
Just don't update the date field each time. I assume you have an inert statement for adding new records that sets the date field to the value of your hidden field, and you have an update statment. In your update statement just don't update that particular field
Thanks, I knew it's something simple...