View Single Post
Old 03-20-2008, 03:05 PM   #3 (permalink)
quantumkangaroo
The Contributor
 
quantumkangaroo's Avatar
 
Join Date: Feb 2008
Location: Pretoria, South Africa
Posts: 42
Thanks: 1
quantumkangaroo is an unknown quantity at this point
Default

Hehe sorry for that should have word the post a little different yes is_numeric would check for any numeric value in a given string or variable so fsda342 would be True.

Of course for user input you could always use str_replace to remove the quotes and thus u have a clean value. I didn't include this but here is an example.

PHP Code:
$pid $_GET['pid'];
$replace '"';
$pid str_replace($replacement""$pid);
if (
is_numeric($pid)) {
 
// What you want to do

That should fix that issue now on to the bool, it always gives me a true value, i have spoken to a few people to also have this same problem.
__________________
virtueCart v1.0.5 developed by WebDevSA

Send a message via MSN to quantumkangaroo Send a message via Skype™ to quantumkangaroo
quantumkangaroo is offline  
Reply With Quote