Question
1.Write PHP scripts so that you can query to the sakila database, and from the customer table, select the 10th customer when sorted the customer
1.Write PHP scripts so that you can query to the "sakila" database, and from the "customer" table, select the 10th customer when sorted the "customer" table based on the "last_name" in alphabetical order. Also, join "address" and "city" tables when querying to the "customer" table. Save the query result in a PHP variable so that you can use it in the next task.
2. In the "form_generator.php" file, below the DB query scripts, write PHP scripts so that a form is dynamically generated. Make five inputs that allow users to enter customer information. Names of the inputs for the form include:
- "first_name" (text type)
- "last_name" (text type)
- "email" (email type)
- "address" (text type")
- "city" (text type")
Also, there needs to be a "submit" button, and when submitted, the "form_display.php" file needs to be called so it can receive the data.
When generating this form, use the 10th customer data that you retrieved from Task 1 so that you can set the default values for the five inputs. Ideally, if a user opens the "form_generator.php" file on the browser, the user should be able to see the five inputs and a submit button, and these five inputs should already have values it them (the values are the 10th customer information).
I already figured out #1 I need help with number 2. Thank you so much. Please include all tags and show steps because I am having trouble querying from MySQL Workbench using PHP.
Thank you so much!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started