Valid Session characters

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nwp
Forum Contributor
Posts: 105
Joined: Sun Feb 04, 2007 12:25 pm

Valid Session characters

Post by nwp »

Among Them which are not allowed as session characters (e.g. as session variable's Key or Value)
Please I Need Urgent reply

Code: Select all

'<space> ', '+', '_', '*', '&', ':', '-', '@', '=', '|'
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

I think

Code: Select all

'|'
Making Some problem
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't understand the question.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

I think he is meaning in the session array, can he assign any of the following list of characters he mentioned to the array key or array value. Is that valid in php.
PHP validates all as long as you pass them as strings, I mean to say as long as you put your value in quotes it validates.
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

All the Characters he have used Can be used as
$_SESSION["<char>"] = "<char>";
except the |
If he Use $_SESSION["|"] = "|";
The Session variable will probably get set when the php script gets executed
After that when when someone wants to get the value of the session variable
The Compleate Session Will be erased
Post Reply