Fastest Web Hosting

how to create a session how to set a value in session how to remove data from a session

0 votes
asked Oct 17, 2016 in PHP by Nitin Sangal (340 points)

1 Answer

0 votes
answered Oct 17, 2016 by vibhu.jain (580 points)

Create session : session_start();
Set value into session : $_SESSION['USER_ID']=1;
Remove data from a session : unset($_SESSION['USER_ID'];

session_start() this function must be first line of your code means at top of code otherwise u will get header related errors.

Job Board

TechnicalSharp is a technical community of developers where they are sharing their knowledge and solutions and against it they are getting the score point which help them to make profile strong which is under eyes on MNC's
...