+ 20

In php, how to use session and stored the data in server ?..

<?php session_start(); $_SESSION[]; ?> start session like this, it's correct or not...

31st May 2018, 3:53 PM
madhina
madhina - avatar
7 odpowiedzi
+ 17
thank for given the link..
31st May 2018, 6:16 PM
madhina
madhina - avatar
+ 15
Thanks for answer...
31st May 2018, 5:22 PM
madhina
madhina - avatar
+ 6
<?php session_start(); $_SESSION['admin'] = "test"; ?> Session is a temporary file that can be Access by all pages but because this is temporary It will be gone after you close browser because it's not stored on computer to store data on server first you need to create database on server using SQl query
31st May 2018, 4:58 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 3
Read all the comments in this code carefully https://code.sololearn.com/wyRoWNIBl1Sx/?ref=app
31st May 2018, 5:46 PM
Hemath Kumar
Hemath Kumar - avatar
+ 1
you have enter session_start(); and use $_session variable for it
6th Jun 2018, 6:05 PM
DEVANG HIRE
DEVANG HIRE - avatar
+ 1
To store data on a server you must use a Database like MySQL.
7th Jun 2018, 4:09 AM
Shashank
Shashank - avatar
+ 1
first start session like this session_start() then to access stored session data, use below code $_SESSION["sessiondataname"]
12th Jun 2018, 6:00 PM
Mukul Mishra
Mukul Mishra - avatar