Qt,
The easiest way is to convert your dates into a serial day number(i.e.
the number of days that have elapsed between your date, and some
arbitrary date in the dim and distant past - I think PHP uses 25th
November, -4714). There are some calendar functions in php that will do
this for you.
David,
of course. You always should check in the server, even if javascript
is working. You have to protect your data integrity. Sorry I did not
make this clear.
The benefit of checking in javascript(which I suspect is enabled in most
browsers these days), is that the client gets an instant
Alex, and Michael,
here is a code fragment which I have cut and simplified from one of
my working scripts, that does some simple javascript checking of a form.
It should give you an idea of how to do it. There is a lot of
documentation, and examples of javascript on the web. Try a google
Alex,
as a general rule of thumb, try to do as much checking as you can with
JavaScript. For those checks such as "is the field a valid date", "is
the field numeric" and so on, it is much faster to check on the client,
than to send the data back to the server and check it there. Probably
th
4 matches
Mail list logo