Jump to content

php mysql insert date


ragrim

Recommended Posts

first of all sorry if this is in the wrong section, i wasnt sure where to post it.

 

im trying to insert a date into mysql from a html form but it just ends up adding 0000-00-00 in the date field no matter what i do, ive been trying to figure this out for weeks.

 

my form use a date picker in dd-mm-yyyy format and i pass it to a php script with $_POST and that works fine, but putting the data into mysql never works.

 

do i need to convert the date format somehow? i need the form to be in dd-mm-yyyy format cause im in australia and thats about the only way we can read it over here.

 

any help on this would be muchgly appreciated, thank you.

Link to comment
https://forums.phpfreaks.com/topic/134924-php-mysql-insert-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.