Hi all....... when i want to check on integer value on variable.. eg:$valunumber is variable for text box when i enter submit and i pass a value for text box to the script which check if it is integer or no by is_int($valunumber)...will give me error rusult .. how can i solv this problem....? thx alot
is_int() checks the type, not the content.
if (ereg("[[:digit:]]+$", $valnumber)) $valnumber = (int)$valnumber; else <report error>