This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // DATE/TIME Manipulation for dates from php to mysql and back again | |
| // get time and date right now for inserting datetime into mysql | |
| // the field in the db should be set as a mysql "datetime" field type | |
| // First - set the local timezone | |
| date_default_timezone_set('America/New_York') | |
| // use this in a hidden form field to insert the time into db record | |
| echo date('Y-m-d H:i:s',time()); |