<?php
session_start();
// Set session variables
$_SESSION['username'] = 'john_doe';
$_SESSION['user_id'] = 123;
// Display session data
echo "Username: {$_SESSION['username']}, User ID: {$_SESSION['user_id']}";
?>
<?php
session_start();
// Set session variables
$_SESSION['username'] = 'john_doe';
$_SESSION['user_id'] = 123;
// Display session data
echo "Username: {$_SESSION['username']}, User ID: {$_SESSION['user_id']}";
?>
Related
how to get country, state and city select option using google map api in php |
Create a PHP script that calculates the average of an array of numbers. |
Write a PHP script that generates and displays a list of the first 10 Fibonacci numbers. |
How to call travelport catalogproductofferings api using php? |
How to reverses a given string using PHP. |
Write a PHP script that calculates the factorial of a given number using an iterative approach. |
How to prevent SQL Injection using php |
Create a PHP script that checks whether a given number is a prime number or not. |
