Exercises

  1. What is the reason that register_globals is disabled by default in PHP?

  2. Which of the following superglobals are not contained inside of $_REQUEST:

    • a) $_GET

    • b) $_COOKIES

    • c) $_FILES

    • d) $_POST

  3. Give one advantage of using POST to send form data, and one advantage of using GET.

  4. Why is the is_numeric() function a better choice for form validation than the is_int() function?

  5. Which PHP function will automatically strip any HTML tags out of a variable?

  6. Why might the CTYPE functions be the preferred method for data validation?

  7. Client-side validation should be avoided at all times: true or false?

 

Next chapter: Further reading >>

Previous chapter: Summary

Jump to:

 

Home: Table of Contents

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar