< Back
Page 5 of 5
This chapter is from the book
Workshop
The workshop is designed to help you review what you’ve learned and begin putting your knowledge into practice.
Quiz
- Which PHP function sends mail?
- Why is $mysqli named as a global variable in Listing 19.1?
- What PHP function call causes the script to execute for as long as it needs to run?
Answers
- This is not a trick question. It’s the mail() function!
- Because the variable $mysqli is created and assigned a value in a function that is included in one script for use by another, the variable must be declared as global to ensure it is usable outside of the confines of the function in which it was created.
- set_time_limit(0)
Activities
- Modify the manage.php script to display the user’s email as part of the response message for any action that is taken.
- Modify the sendmymail.php script to add additional form fields that will correspond to section headings in the message string itself. Remember that when the form is submitted, those strings will have to be concatenated into one message string that is sent to the mail() function.
< Back
Page 5 of 5