The error I get: "Notice: Undefined variable: first_name in \display.php on line 13" (Picture below)

display.php
<?php // get the data from the request $fist_name = $_GET['first_name']; $last_name = $_GET['last_name']; ?> <html> <head> <title>Name Test</title> <link rel="stylesheet" type="text/css" href="main.css"/> </head> <body> <h2>Welcome</h2> [B]<p>First Name: <?php echo $first_name; ?></p>[/B] <p>Last Name: <?php echo $last_name; ?></p> </body> </html>
display.html
<html> <form action="display.php" method="get"> <label>First Name:</label> <input type="text" name="first_name"><br> <label>Last Name:</label> <input type="text" name="last_name"><br> <label> </label> <input type="submit" value="Submit"> </form> </html>
Any help would be appreciated. I have tried the last couple hours to figure it out but not sure. I want to move ahead in my textbook but don't want to overlook errors.


Sign In
Create Account

Back to top









