Re: Validating user input

From: Date: Tue, 03 Jun 2003 09:36:04 +0000
Subject: Re: Validating user input
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149903@lists.php.net to get a copy of this message
Try this... I don't know if this will suit your needs but it'll give you an idea: <?php // $a contains the time entered by the user if($a > 0 && $a < 24) { $time = number_format($a, 2, '.', ''); echo "Time: $time\n\n"; } else { echo "Invaild Time.\n\n"; } ?> Regards, John -- -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

« previous php.general (#149903) next »