Forum Moderators: coopster

Message Too Old, No Replies

Session number at begining?

         

FiRe

3:15 pm on Sep 18, 2006 (gmt 0)

10+ Year Member



Is it ok to have a number at the beginning of a session?
Example:

$_SESSION['5name'] = "bob";
$_SESSION['2phone'] = "12345";

?

jatar_k

3:25 pm on Sep 18, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well, given the rules about vatriable names
[php.net...]

Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.

so really you should have the number after, if that was used on a server with register_globals on it would cause problems.