Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Solution to Question 14-1
Cookies are stored on the web user's hard drive.
Solution to Question 14-2
The md5( ) function creates a one-way encoding of the password.
Solution to Question 14-3
To store the value 1 in the user_id session variable, specify:
<?php
session_start( );
$_SESSION['user_id'] = 1;
?>
Solution to Question 14-4
Display the value stored in the user_id session variable as follows:
<?php
session_start( );
echo $_SESSION['user_id'];
?>