Exercises, Questions, and Projects


  1. After studying the session example, create ASP and PHP scripts that generate cookies that specify the look of a page, starting with the background color. You can also specify the color of the text, link, vlink, and alink text.

  2. Create cookies that last a different amount of time than five minutes.

  3. Create ASP or PHP scripts to record as cookies ID and password information to save people from re-entering information into a form.

  4. Using a file (see the previous chapter), create an ASP or PHP set of scripts that accepts an ID and password pair of fields and compares them to sets kept in the file. If there is a match, set a session variable such as pwokay to true. Check this value in other scripts, and if it is not set, return to the script to enter ID and password. The PHP command for this is header("Location: pw.php"), assuming pw.php is the script with the form to enter ID and password. The ASP command is Response.Redirect ("pw.asp"), assuming pw.asp is the corresponding script.




Creating Database Web Applications with PHP and ASP
Creating Database Web Applications with PHP and ASP (Charles River Media Internet & Web Design)
ISBN: 1584502649
EAN: 2147483647
Year: 2005
Pages: 125
Authors: Jeanine Meyer

Similar book on Amazon

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