Test Your Knowledge

  1. What is the standard PHP function for connecting to a MySQL database?

  2. When is the mysql_result function not optimal?

  3. Give one reason why using the POST form method is usually better than GET.

  4. How can you determine the most recently entered value of an AUTO_INCREMENT column?

  5. Which PHP function escapes a string, making it suitable for use with MySQL?

  6. Which function can be used to prevent XSS injection attacks?

See Chapter 10 Answers in Appendix A for the answers to these questions.

Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.