I have a registration form on my website that i can fill out then it shoots over to another.php file. i can echo all of the data except for the first name, last name, and phone number. it gives me an error that says:
Notice: Undefined index: Phone Number in C:\xampp\htdocs\Week 1\sql data.php on line 15
Here is the code im using for the form
<!DOCTYPE HTML>
<html>
<body>
</ul>
</nav>
<div class="container">
<h1 style="color:blue;font-size:40px;">Registration</h1>
<p style="color:green;font-size:18px;">Please fill in this form to create an account for the Employee Web Portal.</p>
<form action="sql data.php" method="post">
Id: <input type="text" placeholder="Enter Employee Id" name="Id" required><br>
Email: <input type="text" placeholder="Enter Email" name="Email" required><br>
Password: <input type="text" placeholder="Enter Password" name="Password" required><br>
First Name: <input type="text" placeholder="Enter First Name" name="First Name" required><br>
Last Name: <input type="text" placeholder="Enter Last Name" name="Last Name" required><br>
Address: <input type="text" placeholder="Enter Full Address" name="Address" required><br>
Phone Number: <input type="text" placeholder="Enter Phone Number" name="Phone Number" required><br>
Salary: <input type="text" placeholder="Enter Salary" name="Salary" required><br>
SSN: <input type="text" placeholder="Enter SSN" name="SSN" required><br>
<input type="submit">
</form>
</body>
</html>
Then it goes over to another file called sql data.php and that code is:
<html>
<body>
Your Employee Id is: <?php echo $_POST["Id"]; ?><br>
Your Email is:<?php echo $_POST["Email"]; ?><br>
Your Password is:<?php echo $_POST["Password"]; ?><br>
Your First Name is:<?php echo $_POST["First Name"]; ?><br>
Your Last Name is:<?php echo $_POST["Last Name"]; ?><br>
Your Address is:<?php echo $_POST["Address"]; ?><br>
Your Phone Number is:<?php echo $_POST["Phone Number"]; ?><br>
Your Salary is: <?php echo $_POST["Salary"]; ?><br>
Your SSN is: <?php echo $_POST["SSN"]; ?><br>
</body>
</html>
I am not sure why its saying that the name field is undefined? there is data input in every field and all the other fields come over just fine