[ciapug] times again
Carl Olsen
carl-olsen at mchsi.com
Sun Dec 18 11:03:33 CST 2005
That's correct. There's no way they can enter an invalid time. The
validation is just for dates. Of course, you could be checking for some
time range, in which case you would use validation.
Carl
-----Original Message-----
From: ciapug-bounces at cialug.org [mailto:ciapug-bounces at cialug.org] On Behalf
Of Dave J. Hala Jr.
Sent: Sunday, December 18, 2005 10:03 AM
To: carl-olsen at mchsi.com; PHP List
Subject: RE: [ciapug] times again
Thats interesting. I'm thinking that if I do a listbox for hours,
minutes and am/pm, I shouldn't have to do any validation.
On Sun, 2005-12-18 at 09:50, Carl Olsen wrote:
> Oops, sorry, I didn't read carefully. You could use this same method with
> time, but the validation would be different.
>
> Carl
> http://www.carl-olsen.com/
>
> -----Original Message-----
> From: ciapug-bounces at cialug.org [mailto:ciapug-bounces at cialug.org] On
Behalf
> Of Carl Olsen
> Sent: Sunday, December 18, 2005 9:49 AM
> To: ciapug at cialug.org
> Subject: RE: [ciapug] times again
>
> Here's the code for validating the input:
>
>
>
if(!checkdate((int)(substr($date,4,2)),(int)(substr($date,6,2)),(int)(substr
> ($date,0,4))) || strlen($date) == 0)
> {
> throw new exception("Invalid date.");
> }
>
> -----Original Message-----
> From: ciapug-bounces at cialug.org [mailto:ciapug-bounces at cialug.org] On
Behalf
> Of Dave J. Hala Jr.
> Sent: Sunday, December 18, 2005 9:14 AM
> To: PHP List
> Subject: [ciapug] times again
>
> Anyone doing anything interesting when having users enter a time? For
> example: "An end user would enter the time that an event starts". I'm
> thinking maybe a listbox for the hour, one for the minutes and one for
> am/pm.
>
> Anyone have any comments on what works best?
>
> :) Dave
--
Open Source Information Systems, Inc. (OSIS)
Dave J. Hala Jr., President <dave at osis.us>
641.485.1606
_______________________________________________
ciapug mailing list
ciapug at cialug.org
http://cialug.org/mailman/listinfo/ciapug
More information about the ciapug
mailing list