|
Posted by Bob on 10/11/14 11:06
Bob writes:
: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
OOPS!, I mean 64 is the expected output!
: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]
|