RE: [PHP-WIN] Making sure a date field is entered.
| From: | Ignatius Teo | Date: | Wed, 09 Aug 2000 02:02:45 +0000 |
| Subject: | RE: [PHP-WIN] Making sure a date field is entered. | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1650@lists.php.net to get a copy of this message | ||
Hmmm. checkdate only accepts (int) month, day, year as parameters, so you have to extract the info
from your form var.
I would suggest using <select> drop boxes to restrict the input - that might make it easier.
Ignatius
> -----Original Message-----
> From: Tom Peck [mailto:tompeck@paradise.net.nz]
> Sent: Wednesday, 9 August 2000 11:39
> To: PHP
> Subject: [PHP-WIN] Making sure a date field is entered.
>
>
> Hello All
>
> Is there a PHP function which can make sure a string is a
> date? I have a
> form where a date is entered in the format: "Saturday 23
> August". The form
> gets passed onto another page which makes sure all the fields
> are correct -
> but I'm stumped as how to make sure that this date has been
> put in properly.
> It needs to be inserted properly so that I can run a database
> query getting
> all the data from a database, ordered by Date...
>
> Thanks for any help.
>
> Tom
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>