Hi,
I am using PHP version 4.3.0, Apache 2.0.44 on Windows XP. I am new to
Sessions and need your help with the problem below...
I've done this simple session test:
on session1.php:
?
session_start();
session_register(sess_var);
$sess_var = Hello World!;
echo The content of \$sess_var is
It's much easier and works better to use:
?php
session_start();
$_SESSION['sess_var'] = Hello World!;
//then you can echo
echo The content of \$_SESSION['sess_var'] is . $_SESSION['sess_var']
. br;
?
a href=session2.phpNext Page/a
?
That will set everything and echo correctly... this also makes
YEES!!
I've used:
#page1.php
?php
session_start();
$sessionID = session_id();
$_SESSION['foo'] = 'bar';
echo '\$_SESSION['foo'] = {$_SESSION['foo']} br.$sessionID.br;
?
a href=page2.phpNext Page/a
and
#page2.php
?php
session_start();
echo $_SESSION['foo'];
?
and on page2.php finally
3 matches
Mail list logo