Question

PHP Create an HTML Form that asks for a series of personal information from the user,...

PHP

Create an HTML Form that asks for a series of personal information from the user, and once the user presses the [SUBMIT] button, sends the data to a PHP script that generates HTML code displaying the data entered. The form should have the following fields:

  • First Name (using the text input type)
  • Last Name (using the text input type)
  • E-mail Address (using the email input type)
  • Phone Number (using the tel input type)
  • Date of Birth (using the date input type)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

HTML CODE

<!DOCTYPE HTML>
<html>
<body>

<form action="welcome.php" method="post">
First Name: <input type="text" name="first_name"><br>
Last Name: <input type="text" name="last_name"><br>
E-mail Address: <input type="email" name="email"><br>
Phone Number: <input type="tel" name="phone"><br>
Date of Birth: <input type="date" name="dob"><br>
<input type="submit">
</form>

</body>
</html>

welcome.php

<html>
<body>

Your First Name: <?php echo $_POST["first_name"]; ?><br>
Your Last Name: <?php echo $_POST["last_name"]; ?><br>
Your Email Address: <?php echo $_POST["email"]; ?><br>
Your Phone Number: <?php echo $_POST["phone"]; ?><br>
Your DOB: <?php echo $_POST["dob"]; ?><br>
</body>
</html>

Add a comment
Know the answer?
Add Answer to:
PHP Create an HTML Form that asks for a series of personal information from the user,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PHP you need to create a form to allow the user to enter their name, email,...

    PHP you need to create a form to allow the user to enter their name, email, and address information. That information will be sent to a PHP script that will process and display that information. Your assignment should have two pages. The first page is straight html (user_input.html) that has a form with the appropriate form elements to collect the user input. The form should then be submitted using the POST method to a php script (display_user_info.php) that will process...

  • Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file,...

    Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file, "insert-user-form.php", with a form that has the following fields: - First Name (text) - Last Name (text) - Email (text) - Password (text) - Submit button Create another PHP file, "insert-exercise-form.php" with a form that has the following fields: - Exercise Name (text) - Description (text) - Demonstration Image (file) - Submit button Create another PHP file, "login-user-form.php" with a form that has the...

  • Create an HTML form that takes these inputs: Number of rows, and number of columns. This...

    Create an HTML form that takes these inputs: Number of rows, and number of columns. This form will submit to a PHP page. Create that page that will accept input from the HTML form and generates the table from the user's input. I already have the portion that generates the table based on user input by using Javascript in an HTML page, I just need to know how to generate the table using a PHP page instead. Here's the code...

  • How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow...

    How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow user to add his name and email to my database, all I need to print my final database when the user click on submit. <form action="" method="post"> <label>Name :</label> <input type="text" name="name" required="required" placeholder="Please Enter Name"/><br /><br /> <label>Email :</label> <input type="email" name="email" required="required" /><br/><br /> <input type="submit" value=" Submit " name="submit"/><br /> </form>...

  • PHP code that is given : <?php // Here is where your preprocessing code goes //...

    PHP code that is given : <?php // Here is where your preprocessing code goes // An example is already given to you for the First Name $fname = $_GET['fname']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Exercise 2 - GET Echo</title> <style> body { margin:0; padding:0; font-family: Arial; } form { margin:20px; } input[type="text"], input[type="password"] { width:150px; padding:3px; font-size:1em; } input[type="submit"] { padding:3px; font-size:1em; } label { display:inline-block; width:150px; } .input-container { padding:5px; } </style> </head> <body> <form...

  • Hey Guys I am doing a project and need some help with code in HTML and...

    Hey Guys I am doing a project and need some help with code in HTML and PHP. I need a form made in HTML that can be sent to a specific email through PHP. For some reason the info is not getting sent to my email, even though it says that it was sent. I have some source code here: <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $email = mail('MY_EMAIL', $subject, $message,...

  • 8. Write a script that creates an associative or multidimensional array in PHP a. And displays that array in a table b. Create a form with at least two input fields and a Submit button. c. Write a scr...

    8. Write a script that creates an associative or multidimensional array in PHP a. And displays that array in a table b. Create a form with at least two input fields and a Submit button. c. Write a script that will validate that the user entered data in the input fields and that the fields are not blank when the Submit button is pressed d. And returns the values entered in the input field when the Submit button is pressed.

  • LANGUAGE JAVASCRIPT, PHP Need help with PHP and ajax code. The user needs to login but,...

    LANGUAGE JAVASCRIPT, PHP Need help with PHP and ajax code. The user needs to login but, I keep getting an error that I coded "Wrong username and password!" ***PLEASE DONT GIVE ME A NEW CODE THAT IS NOWHERE NEAR THE CODE I SUBMITTED***** PLEASE LOOK AT THE CODE AND SEE ANY ISSUES login.html <!DOCTYPE html> <html> <head> <title>login popup</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <style type="text/css"> body { background-color: white; } </style> </head> <body> <center> <h1 style="text-align: center;"> Login </h1> <form>             Login ID:...

  • I NEED SOME HELP WITH THIS PLEASE :) 1. Create a data entry form on one...

    I NEED SOME HELP WITH THIS PLEASE :) 1. Create a data entry form on one of your web pages for visitors who want to be added to your mailing list. Include one of each of the following input elements*: Text <input type="text".... • Tel <input type="tel".... . Email <input type="email"... Date <input type="date"... . A set of radio buttons <input type="radio"... • A set of check boxes <input type="checkbox"... • A select element with options <select>.....</select> (do NOT add...

  • Modify this code to store the form elements as variables and display them on the page...

    Modify this code to store the form elements as variables and display them on the page in an HTML table. <!DOCTYPE html> <html> <head> <script> function getValues() {     var result = ""; result += "First Name: " + document.forms["myForm"]["fname"].value + "<br>"; result += "Last Name: " + document.forms["myForm"]["lname"].value + "<br>"; result += "Address: " + document.forms["myForm"]["address"].value + "<br>"; result += "City: " + document.forms["myForm"]["city"].value + "<br>"; result += "State: " + document.forms["myForm"]["state"].value + "<br>"; document.getElementById("output").innerHTML = result; } </script>...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT