Re: Insert Data Into Mysql
| From: | Jim Giner | Date: | Sat, 11 Jan 2014 19:09:43 +0000 |
| Subject: | Re: Insert Data Into Mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322674@lists.php.net to get a copy of this message | ||
On 1/10/2014 4:53 PM, Robert wrote:
I have a date field on an html form that users may leave blank. If they do leave it blank I want to write the date 01/01/1901 into the mysql table. How can I accomplish this and where in my .php script file should I put the code? Thank You, Robert flahurr@comcast.net Robert,It really makes no sense to post a completely fabricated value into your date field to represent 'the absence' of a date. From now on you will be forced to mask that value OUT of your output displays since I'm fairly certain you will not want to show people that silly date value. Do you realize that just leaving the date = null you will accomplish the same thing and you won't have to 'hide' it when you call up a record and send it to the client? Can you give us one valid reason that you wish to do this thing?