at the top of page
session_start();
then to set session
variable
$_SESSION['id'] = $someID;
To retrieve the value of id
$pid = $_SESSION['id'];
More Related Contents:
- how can I print multiple services in this way
- PHP Extract email address from a string [closed]
- How to find number of variables passed in function in php [closed]
- In PHP, what is a closure and why does it use the “use” identifier?
- How do I find all YouTube video ids in a string using a regex?
- How to get count of rows in MySQL table using PHP?
- Pulling Track Info From an Audio Stream Using PHP
- Post request in Laravel – Error – 419 Sorry, your session/ 419 your page has expired
- How can I have a 64-bit integer in PHP?
- How to bind mysqli bind_param arguments dynamically in PHP?
- MySQL Prepared statements with a variable size variable list
- PHP: Split string [duplicate]
- Calling non-static method with double-colon(::)
- php Replacing multiple spaces with a single space [duplicate]
- Connect to SQL Server through PDO using SQL Server Driver
- Why is password_verify returning false?
- How to load PHP file into DIV by jQuery?
- How do I replace part of a string in PHP? [duplicate]
- Laravel OrderBy relationship count
- Very large uploads with PHP
- Why does 1234 == ‘1234 test’ evaluate to true? [duplicate]
- PDO drivers no value in Windows
- Doctrine – How to print out the real sql, not just the prepared statement?
- Mock in PHPUnit – multiple configuration of the same method with different arguments
- Re-index numeric array keys [duplicate]
- How to automatically detect user’s timezone?
- SimpleTest vs PHPunit
- get image from base64 string
- Cannot figure out how to run a mysqli_multi_query and use the results from the last query
- Composer install error – requires ext_curl when it’s actually enabled