Section A.13. Chapter 13


A.13. Chapter 13


Solution to Question 13-1

Cookies are stored on the web user's hard drive.


Solution to Question 13-2

The md5() function creates a one-way encoding of the password.


Solution to Question 13-3

To store the value 1 in the user_id session variable, specify:

 <?php     session_start();     $_SESSION['user_id'] = 1; ?> 


Solution to Question 13-4

Display the value stored in the user_id session variable as follows:

 <?php     session_start();     echo $_SESSION['user_id']; ?> 



Learning PHP and MySQL
Learning PHP and MySQL
ISBN: 0596101104
EAN: 2147483647
Year: N/A
Pages: 135

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net