-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
28 lines (23 loc) · 833 Bytes
/
index.php
File metadata and controls
28 lines (23 loc) · 833 Bytes
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
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>PHP Form Example</TITLE>
<link rel="stylesheet" href="styles.css">
</HEAD>
<BODY>
<h2>HTML Form</h2>
<!-- code adapted from https://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_submit -->
<!--
This PHP file is given to you, the student, with no PHP in it.
Your assignment is to insert PHP into this file to process the form data.
-->
<form action="index.php">
<label for="firstname">First name:</label><br>
<input type="text" id="firstname" name="fname" value=""><br>
<label for="lastname">Last name:</label><br>
<input type="text" id="lastname" name="lname" value=""><br><br>
<input type="submit" value="Submit">
</form>
<p id="demo">When you click the "Submit" button, the form data will be sent to this same page URL.</p>
</BODY>
</HTML>