Creating a session with Javascript that can be read by PHP?
Posted: Thu Oct 06, 2005 12:08 am
Hi all, I have a session, this is an example of the content this session could contain:
So you get the idea, with PHP that is how I would stick the contents into $clientid.
How can I get this with javascript though? How can I create a session in a javascript script I've written that can then be read by the PHP script later down the track with the code $clientid = $_SESSION['nav']['client_id'];
Can it be done at all?
All advice appreciated,
Rob
Code: Select all
$_SESSION['nav']['client_id'] = "1"; //Make the first client they see client #1
$clientid = $_SESSION['nav']['client_id'];How can I get this with javascript though? How can I create a session in a javascript script I've written that can then be read by the PHP script later down the track with the code $clientid = $_SESSION['nav']['client_id'];
Can it be done at all?
All advice appreciated,
Rob