Jump to content

Archived

This topic is now archived and is closed to further replies.

craigbabe

Altering a inputted message

Recommended Posts

hey I have a site where you can bet on things. But people are cheating in some scripts by betting 100% or 100* or something like that..

If it was called
$bet = 100* ;

how can I alter the string so it only outputs the 100 and not the * ?

Share this post


Link to post
Share on other sites
You can use ereg and preg functions but the simplest to validate input is a numeric integer is to use:

[a href=\"http://us2.php.net/manual/en/function.ctype-digit.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.ctype-digit.php[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.