+ 1
How to use SESSION in PHP???
2 Respuestas
+ 5
//First page
<?php
session_start();
$_SESSION['name'] = 'james';
?>
// Second page
<?php
session_start();
echo $_SESSION['name'];
?>
// run first page and then second page.It will print james
0
One thing that must you remember is, wherever you want to use SESSION in php, you must call start_session(); function first before you using others SESSION function or variable
cmiiw :)