<?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
Create a simple PHP script that calculates the sum of all even numbers between 1 and 10. |
How to check if a given number is a perfect number. |
Create a PHP function to count the number of vowels in a string. |
Create a PHP script that prints the current date and time. |
Write a PHP script that generates and displays a simple multiplication table for the numbers 1 to 5. |
How to convert a temperature from Celsius to Fahrenheit using php. |
how to get current lat and lng from ip address using google map api in php? |
How to call travelport catalogproductofferings api using php? |
