Hi Guys

I seem to have a problem with data types in php

when executing the following script , i do not get the desired output.

i a pass url parameter (message) to the script.

if i pass a numeric value (1) , the script accepts it as '01' and vice versa.
the same with 0 and '00'

here is the script:

<?php
   $theMessage = $_REQUEST['message'];
echo "theMessage : '" . $theMessage . "'\n"; if ($theMessage == "01")
   {
       echo "message : '01'";
   }else if ($theMessage == "00")
   {
       echo "message : '00'";
   }else if (is_numeric($theMessage))
   {
        echo "Numeric Input : " . $theMessage;
   }else
   {
       echo "Invalid Input";
   }
?>

i presume that i am not interpreting the data types it should be interpreted.

can anyone please help

--
Arno Coetzee
Flash Media Group
Developer
Mobile : 27 82 693 6180
Office : 27 12 430 7597

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to