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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.