Re: How can I check form variables in $_POST to make sure they are theright format?

From: Date: Fri, 06 Jun 2003 15:55:13 +0000
Subject: Re: How can I check form variables in $_POST to make sure they are theright format?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-150514@lists.php.net to get a copy of this message
> whats the different between currency and number??? aren't they both number? > > are you trying to check if the number format is in currency like 2 decimal > place or something?? > Well I want to check that the format is a number. Because it's currency, I want to double check to see if there are any $s or similar, and strip them (maybe trim?). And I want to convert the number from a string to a number -- which is another reason I want to make sure nobody enters something stupid like "eighteen dollars". Thanks, -Dan > > > ----- Original Message ----- > From: "Dan Anderson" <dan@mathjunkies.com> > To: <php-general@lists.php.net> > Sent: Friday, June 06, 2003 4:45 PM > Subject: [PHP] How can I check form variables in $_POST to make sure they > are theright format? > > > > Is there a way to check form variables provided in $_POST once a user > > submits the form to make sure they are currency or numbers? > > > > Thanks, > > > > Dan > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#150514) next »