How to create sessions after logging in to a webpage? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to create sessions after logging in to a webpage?

I want to create a secured webpage using sessions, need help to implement this.

2nd Aug 2017, 4:36 AM
Vivek Singh
Vivek Singh - avatar
3 Answers
+ 2
You should use PHP, for example. <?php // Start the session session_start(); $_SESSION['name'] = $_POST['name']; ?> <!DOCTYPE html> <html> <body> <?php echo "Hello, " . $_SESSION['name']; ?> </body> </html>
2nd Aug 2017, 12:38 PM
Paul Ivanov
Paul Ivanov - avatar
+ 6
It is nice one 👌
15th Aug 2017, 8:14 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 5
yes 👍 got it , thanks
14th Aug 2017, 7:41 PM
Vivek Singh
Vivek Singh - avatar