Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Given the following MySQL table: doctors (The Primary key in the first column and it is an automatic number) Table name: doctors (for Doctors) column

Given the following MySQL table: doctors (The Primary key in the first column and it is an automatic number)
Table name: doctors (for Doctors) column names are highlighted
dId
Doctor ID dName
Name dSalary
Salary dJoinDate
Joining date dGender
Gender
dWilyatSq
Wilayat Id
200
Saif Ali
950 2011-08-03 M
3
300
Muneer Khalid
980
2009-01-25 M
2
500
Rawan Sami
870
2019-03-14 F
2
Table name: wilayats(for Wilayat data)
wSq
Wilayat ID wName
Wilayat Name
1 Nizwa
2 Izki
3 Bahla
2. Given also the following HTML form page and its source code that is used to add data to MySQL database
Web Browser Output
Adding data for new Doctors
Name:
Salary:
Joining Date:
Wilayat
Gender: Male Female
Name:
Salary:
Joining Date:
Wilayat:
Gender:
value="M">Male
Female
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)
Sanitize ONLY the input value of the Name field.
Write the query that will ADD this new data to the doctors table which is described above? (note that the dId is an auto-increment field)
Write the statement that will execute this query
Redirect the user to this page newDoctorForm.php after the adding process.
Type your answer in the box shown below, no file upload is required

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions