This question has been answered
Question

I need to make a SQL statement using MYSQL

Below are the practice questions, but it's so complicated that I don't know how to code it... I need your help!


  1. I need to make a form in a new document "index.php" which takes 4 values: employee id, first name, last name and mail address.
  2. I should use PHP for this! Now in a new file "db.php", I have to use PHP with MYSQUL functions to do the following:
  • I need to open a connection with my database server (umysqli_connect)
  • If the database does not exist, I need to make a new database called Practice08
  • And then I need connect to and select this database!
  • I need to make a new table Employee_info if it does not exist
  • I need to make sure that the input value employee_id from the form is unique and does not already exist in the table! And if it is unique, I nee to add all inputs from the form into the table
  • Once information has been entered, my webpage should display a success message!


3 Now I have to go into PHPMyAdmin and verify if the database and table is created and information has been added correctly.


4 I should use PHP document for this! I need to make a new form that takes 2 values: employee id and email address. This form should allow the user to modify their mail address.


5 And then l need to use PHP document for this! In "db.php", I need to use PHP with MYSQL functions to do the following:

  • If the employee id entered in the form in Question 4 exists in the Employee_info table, I have to update their mail address to the new mail address input by the user.
  • And then I need to display success message on my webpage after the change is made


6 Finally, I have to go into PHPMyAdmin and verify that the change has been made!

Answered by Expert Tutors
Step-by-step explanation
11 Attachments
Database Page.PNG
PNG
Database Table Created And data inserted.PNG
PNG
Htdocs folder.PNG
PNG
Index Page.PNG
PNG
Inserted And Table Created.PNG
PNG
Modify Page.PNG
PNG
No Database.PNG
PNG
Ready to create database and table.PNG
PNG
Updated.PNG
PNG
Userexisting.PNG
PNG
Xammp Running.PNG
PNG
The student who asked this found it Helpful
Overall rating 100%
I need to make a SQL statement using MYSQL Below are the practice questions, but it's so complicated that I don't know how to code it. I need to make...
Get unstuck

261,329 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses