Write a php script to add bmi data records to a database
In this assignment you will use PHP to connect to a database, create a table in a database, and add data records to a database – to store the data from Part 4 of your previous assignment (collecting BMI data via a form). Refer to the PHP – Databases PowerPoint to review the associated commands.
To get started:
• Read the PHP Database Tutorial from w3schools.com.
• Watch the following sections of PHP with MySQL Essential Training tutorial on lynda.com. After logging in, select PHP in the Subject… search field, and then select PHP with MySQL Essential Training.
11. MySQL Basics – topics 1-3, 5-6
• Refer to the PHP – Databases PowerPoint to review the associated commands.
Part 1: Connect to a database and create a table using php
Write a PHP script to connect to your database on istdata.bk.psu.edu and to create a table in the database called bmi that includes fields from your BMI form from Part 4 of your last homework assignment.
Part 2: Add records to a database using php
Write a PHP script to add BMI data records to a database, using a form on a web page – you can use the form in Part 4 of the previous assignment (PHP HW 1) for your data input.
Submit your .html, .php, and any supporting files (e.g., an image) to the drop box on ANGEL.