KCgame
11-07-2005, 07:43 AM
Hi all,
This time i gotten into a critical problem here :(
My host has just upgrade the PHP version from 4.3.1 to 4.4.1
The thing is this, my PHP script suddenly fails to accept any legal values on my server..I am making use of ctype_digit to validate the user's input values.
The following is the testing process that i have taken so far,
1. My script is working fine on my local machine (PHP 4.3.11) and it accepts the legal values
2. Upon uploaded to the server, it fails to accept the same legal value that i have input..is this a PHP version error or server error?? My server runs on PHP 4.4.1
My script looks something like:
if ((!ctype_digit($_POST['houser']) || !ctype_digit($_POST['bankr']) || !ctype_digit($_POST['summonr']) || !ctype_digit($_POST['wallr']) || !ctype_digit($_POST['acrhr']))||($_POST['acrhr']+$_POST['wallr']+$_POST['summonr']+$_POST['bankr']+$_POST['houser']<=0)) {
$ok=0;
} else $ok=1;
FROM php.net:
ctype_digit
(PHP 4 >= 4.0.4, PHP 5)
It should work right :S
Any help is greatly appreciated.
Thank you.
This time i gotten into a critical problem here :(
My host has just upgrade the PHP version from 4.3.1 to 4.4.1
The thing is this, my PHP script suddenly fails to accept any legal values on my server..I am making use of ctype_digit to validate the user's input values.
The following is the testing process that i have taken so far,
1. My script is working fine on my local machine (PHP 4.3.11) and it accepts the legal values
2. Upon uploaded to the server, it fails to accept the same legal value that i have input..is this a PHP version error or server error?? My server runs on PHP 4.4.1
My script looks something like:
if ((!ctype_digit($_POST['houser']) || !ctype_digit($_POST['bankr']) || !ctype_digit($_POST['summonr']) || !ctype_digit($_POST['wallr']) || !ctype_digit($_POST['acrhr']))||($_POST['acrhr']+$_POST['wallr']+$_POST['summonr']+$_POST['bankr']+$_POST['houser']<=0)) {
$ok=0;
} else $ok=1;
FROM php.net:
ctype_digit
(PHP 4 >= 4.0.4, PHP 5)
It should work right :S
Any help is greatly appreciated.
Thank you.
