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@xxxxxxxxxxx
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?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php