[PHP] Re: date calculation

2003-02-16 Thread Fred Merritt
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.

[PHP] Re: recursion?????

2003-02-15 Thread Fred Merritt
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 the

[PHP] Re: Recursion?????

2003-02-15 Thread Fred Merritt
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

Re: [PHP] Re: recursion?????

2003-02-15 Thread Fred Merritt
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