PHP is server side, it has nothing to do with client side, aside from server up some information. You can, and should, validate the input using PHP after it is submitted.
For client side validation you would need to use javascript. You can do what you are trying to do in javascript, but it will get very complicated since you need to use the onkeypress to capture and process each key stroke to make sure the / remain.
I think using PHP to validate after submission would be a lot easier and much more flexible. If you do it right, the user could put in something like +3 to enter a date three days from todays date.



On Friday, September 12, 2003, at 05:20 AM, Bobpilly wrote:


Hello all

I am trying to enforce input masks for dates that are viewable in a single
html text box. For example i would like a single tect box that the user will
see ##/##/#### in and when they click on the field they will only be able to
enter digits in the ## areas the / will remain. Is php cable of doing this?


Thanks for any help in advance!

Cheers

Bob

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to