note 88296 added to function.session-name

From: Date: Mon, 19 Jan 2009 16:47:53 +0000
Subject: note 88296 added to function.session-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-149448@lists.php.net to get a copy of this message
@php at wiz dot cx since you set the name of the session to 'example.com' php will look for $_COOKIE['example.com']. yes, example.com will be converted to example_com. but if you manualy create $_COOKIE['example.com'] containing the value of $_COOKIE['example_com'] then you repaired it (since it 'broke'). this way you can also create multiple cookies wich PHP will read as an array. <?php $_COOKIE['PHPSESSID[0]'] session_name('PHPSESSID[0]'); session_start(); // cookie will be sent like this: PHPSESSID%5B0%5D=d8384e0e0278a8d31186839f5f73374a ?> this way you can add dummy session id. or you could actualy use the extra information. like more parameters to authenticate an user and have php's foreach loop through the array. just some thoughts i liked to share ---- Server IP: 83.137.20.135 Probable Submitter: 84.104.252.118 ---- Manual Page -- http://www.php.net/manual/en/function.session-name.php Edit -- https://master.php.net/note/edit/88296 Del: integrated -- https://master.php.net/note/delete/88296/integrated Del: useless -- https://master.php.net/note/delete/88296/useless Del: bad code -- https://master.php.net/note/delete/88296/bad+code Del: spam -- https://master.php.net/note/delete/88296/spam Del: non-english -- https://master.php.net/note/delete/88296/non-english Del: in docs -- https://master.php.net/note/delete/88296/in+docs Del: other reasons-- https://master.php.net/note/delete/88296 Reject -- https://master.php.net/note/reject/88296 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#149448) next »