Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PHP web application that accepts input from a user and provides output based on the values input. The purpose of this exercise is to: Learn
PHP web application that accepts input from a user and provides output based on the values input.
The purpose of this exercise is to:
- Learn how to connect a PHP application to a MySQL database
- Learn how to retrieve and display data from a MySQL database
The image of the user_list.php code file to create and run a web application using Visual Studio Code.
You will add fields for the user's address. The address fields must include the following:
- Street Address (up to 100 characters)
- City (up to 25 characters)
- State (2 characters)
- Zip Code (10 characters)
Updates must include:
- Ability to store these fields in the database (fields should not be nullable)
- Display of these fields in the user information grid on the web page
- Entry boxes for these fields
I want the code of this - adding street address, city, state, zip code for PHP web application.
user_list.php code: kl?php //Connect to Database $hostname = "localhost"; $username = "ecpi_user"; $password = "Password1"; $dbname = "cis224_wk3gp"; $conn = mysqli_connect($hostname, $username, $password, $dbname); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 1/Query for all users $query = "SELECT * FROM userinfo"; $result = mysqli_query($conn, $query); ?Current Users:
User # | First Name | Last Name | Favorite Number | |
---|---|---|---|---|
The name you entered is: $first_name $last_name
"; if (strlen($email) > 0) echo "The email addres you gave is: $email
"; if (strlen($favorite) > 0) if (is_numeric($favorite)) echo "You said your favorite number is: $favorite
"; else echo "That's not a number!
"; ?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