/ Published in: PHP

This snippet collects a date from a var and formats it into the correct format for database date entry
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//date from a form in the format of dd/mm/yyyy $var_day = $date_array[0];//day seqment $var_month = $date_array[1];//month segment $var_year = $date_array[2];//year segment $departure = "$var_year-$var_day-$var_month";//join them all together to input into a mysql table
Comments
