FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Verifying time in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Verifying time in php [message #179382 is a reply to message #179380] Sun, 14 October 2012 15:50 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(houghi)

> I am aware of those. However I can not figure out how to do a check on
> all of them, without getting lost in if statements.
>
> See below where '-' means empty, 1 means any digit(s) and A means any no
> digit(s). I have not shown all options.
> [...]

I wouldn't care too much about invalid inputs. Instead I would just take
what I get and see what I can do with it.

So I would explicitly cast all values to int (invalid or empty values
will become 0), then just do a simple range check on all of the three
values and then do the math.

Micha

--
http://mfesser.de/
Fotos | Blog | Flohmarkt
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Curl chmod file transfer problem...
Next Topic: test
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 19:23:44 GMT 2024

Total time taken to generate the page: 0.04164 seconds