PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi,
i'm trying to write a date from a text input in a form to a date column in a mysql db but it only works if my client enters it as 2007-01-01.
anyone know how change the input so i can get my clients to enter it as 01-01-2007
cheers
kev
you can change the date after get it
you can do explode('-',$date), this makes a array position 0 - the year, position 1 - the month, and possition 2 - the day
then just do $newdate= $array[2]."-".$array[1]."-".$array[0]