I have seend to many problems when comparing numbers with string values. I always had problems to keep in mind the string to numeric conversion functions.
But no more headeche,i've tryed a method that i've used in Asp and Javascript, and it worked.
Assuming it's a page number and you have register_globals enabled ...
search.php?p=100
$p now it will represent an numerical value
now assume that some p values
1. search.php?p=
$p*=1;//$p will be 0;
2. search.php?p=askdfoa
$p*=1;//$p still will be 0;
2. search.php?p=101
$p*=1;//$p will be 101 as number;
Maybe for somone is helpfull as it was for me
________
George, M
Searches(faq333-4906),Carts(faq333-4911)
But no more headeche,i've tryed a method that i've used in Asp and Javascript, and it worked.
Assuming it's a page number and you have register_globals enabled ...
search.php?p=100
Code:
//no more string to number conversion function
$p*=1;
//now you can compare as a number
if($p==0) $p=1;
now assume that some p values
1. search.php?p=
$p*=1;//$p will be 0;
2. search.php?p=askdfoa
$p*=1;//$p still will be 0;
2. search.php?p=101
$p*=1;//$p will be 101 as number;
Maybe for somone is helpfull as it was for me
________
George, M
Searches(faq333-4906),Carts(faq333-4911)