<?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
Write a PHP script that generates and displays a simple multiplication table for the numbers 1 to 5. |
Write a PHP script that parses JSON data and displays specific information. |
how to get country, state and city select option using google map api in php |
Write a PHP script that calculates the factorial of a given number using an iterative approach. |
Create a PHP script that calculates and displays the area of a rectangle given its length and width. |
how to get current lat and lng from ip address using google map api in php? |
Create a simple PHP script that calculates the sum of all even numbers between 1 and 10. |
Create a PHP script that counts the number of occurrences of each word in a given sentence. |