Given the following MYSQL table: persons (The Primary key in the first column and it is an automatic number) Table name: persons column names are highighted prName prSalary prDoB prGender prWilyatSq Table name: wilayats(for Wilayat data) wName prid Salary Birth date Gender Wilayat id wsq Wilayat ID Person ID Name Wilayat Name Nasser Aziz 630 2011-08-03 Muneer Khald 980 2009-01-25 870 2019-03-14 Nizwa Izki 200 M 3 300 M. 2 500 Rawan Sami Bahla F 2 2. Given also the following HTML form page and its source code that is used to add data to MYSQL database Web Browser Output 1. 2. Name:or> 3. Salary:br> 4. Birth Date: 5. Wilayat: 6. Coption value-"x">-- Select -- 7. .. 8. Gender:Male 10. Female 11. Adding data for a new Person Name: Jamal Obaid Salary: 550 Birth Date: 12/20/2002 Wilayat Bahla Gender: O Male O Female Save Data Note the following: • Do NOT write the validation part. Assume that data was input correctly. • Assume that the database connection id is $conn Write PHP code to do the following (use the box below to type your answer) 1. Sanitize ONLY the input value of the Name field. 2. Write the query that will ADD this new data to the persons table which is described above? (note that the prld is an auto-increment field for the person Id) 3. Write the statement that will execute this query 4. Redirect the user to this page newPersonForm.php after the adding process. Type your answer in the box shown below, no file upload is

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 69C: Update the DETAILRENTAL table to set the values in DETAIL_RETURNDATE to include a time component....
icon
Related questions
Question
Given the following MySQL table: persons (The Primary key in the first column and it is an automatic number)
Table name: wilayats (for Wilayat data)
wsq
Table name: persons column names are highlighted
prid
prName prSalary prDoB prGender prWilyatsq
wName
Person ID
Gender Wilayat id
Salary Birth date
630 2011-08-03
Muneer Khalid 980 2009-01-25
870 2019-03-14
Name
Wilayat ID
Wilayat Name
Nasser Aziz
Nizwa
Izki
Bahla
200
M
3
300
M
2
Rawan Sami
500
F
3
2. Given also the following HTML form page and its source code that is used to add data to MYSQL database
Web Browser Output
1. <form action='saveData.php' method='post'>
2. Name :<input type="text" name="pNm" >br>
3. Salary:<input type="text" name="pSalry" >br>
4. Birth Date:<input type="date" name="pDob" ><br>
5. Wilayat:<select name="pWId">
6. <option value="x">-- Select --</option>
7. <option value="3">Bahla</option>..</select><br>
8. Gender:<input type="radio" name="pG"
9. value="M">Male
Adding data for a new Person
Name: Jamal Obaid
Salary: 550
Birth Date: 12/20/2002
Wilayat Bahla
Gender: O Male O Female
10. <input type="radio" name="pG" value="F">Female
11. <input type="submit" name="save" value="Save Data">
Save Data
Note the following:
• Do NOT write the validation part. Assume that data was input correctly.
• Assume that the database connection id is $conn
Write PHP code to do the following (use the box below to type your answer)
1. Sanitize ONLY the input value of the Name field.
2. Write the query that will ADD this new data to the persons table which is described above? (note that the prld
is an auto-increment field for the person Id)
3. Write the statement that will execute this query
4. Redirect the user to this page newPersonForm.php after the adding process.
Type your answer in the box shown below, no file upload is
Transcribed Image Text:Given the following MySQL table: persons (The Primary key in the first column and it is an automatic number) Table name: wilayats (for Wilayat data) wsq Table name: persons column names are highlighted prid prName prSalary prDoB prGender prWilyatsq wName Person ID Gender Wilayat id Salary Birth date 630 2011-08-03 Muneer Khalid 980 2009-01-25 870 2019-03-14 Name Wilayat ID Wilayat Name Nasser Aziz Nizwa Izki Bahla 200 M 3 300 M 2 Rawan Sami 500 F 3 2. Given also the following HTML form page and its source code that is used to add data to MYSQL database Web Browser Output 1. <form action='saveData.php' method='post'> 2. Name :<input type="text" name="pNm" >br> 3. Salary:<input type="text" name="pSalry" >br> 4. Birth Date:<input type="date" name="pDob" ><br> 5. Wilayat:<select name="pWId"> 6. <option value="x">-- Select --</option> 7. <option value="3">Bahla</option>..</select><br> 8. Gender:<input type="radio" name="pG" 9. value="M">Male Adding data for a new Person Name: Jamal Obaid Salary: 550 Birth Date: 12/20/2002 Wilayat Bahla Gender: O Male O Female 10. <input type="radio" name="pG" value="F">Female 11. <input type="submit" name="save" value="Save Data"> Save Data Note the following: • Do NOT write the validation part. Assume that data was input correctly. • Assume that the database connection id is $conn Write PHP code to do the following (use the box below to type your answer) 1. Sanitize ONLY the input value of the Name field. 2. Write the query that will ADD this new data to the persons table which is described above? (note that the prld is an auto-increment field for the person Id) 3. Write the statement that will execute this query 4. Redirect the user to this page newPersonForm.php after the adding process. Type your answer in the box shown below, no file upload is
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning