Homework 6 (15 points)
This assignment is designed to give you a chance to work with PHP pages that interact with a MySQL database. Homework submission guidelines will be provided by your TA in recitation.
Chapter 8 Reinforcement Exercise 8-1 (Pages 487-490)
On Page 488, Step 7, make sure you use
as the hostname,
as the username and
as the password. You will have to adjust your root password in phpMyAdmin for this to work properly.
On Page 489, Step 9, the code is
missing a closing curly bracket
. It should be added after the last line of code in that step as indicated below.
... ... errno($DBConnect) . ": " . mysql_error($DBConnect) . "</p>"; }
You also will need to
remove the last curly bracket
in Step 10 on Page 489. It is on the last line of code in that step.
Chapter 8 Reinforcement Exercise 8-2 (Pages 490-492)
Chapter 8 Reinforcement Exercise 8-5 (Pages 492-493)
Important note when using PHP 7
Whne using PHP 7 or greater, please note that all of the mysql_* commands have been removed. Instead, you should use the mysqli_* command equivalent by simply add the letter "i" after mysql in those commands.