Originally posted here by :Singh:
Thats what called "Maintaining a State" and thats where "Session Variables and Cookies" come in.

With PHP, you do so by :
PHP Code:
$_Session["loggedIn"] = true/false
setcookie
("user")("loggedIn") = true/false 
With ASP :
Code:
Session("loggedIn") = true/false

Response.Cookies("user")("loggedIn") = true/false
I hope this helps.


- :S:
this really doesnt do anything unless the book is only available on php/asp/whatever pages online. if the file is to be downloaded in a zip/tar/whatever, then h3r3tic's idea works. use a buffer to output the file from a nonpublic location. you can also use .htaccess, usernames, and passwords if you want to get complicated.