Posted by Bob on 10/02/12 11:06
Hi there,
I'm have trouble using numeric user input specified in octal (first digit of
0). It keeps getting interpreted as a decimal number.
User enters 040 in field uinput on form
print $_POST['uinput'] * 2;
output is 80, not 100
Any insight appreciated. Do I need to assign the value a variable first?
What I want to do is accept input as either decimal, hexadecimal or octal as
the user prefers.
I am using php version 4.3.10 but want to be compatible with 4.1.0
-Bob
Navigation:
[Reply to this message]
|