0

The code bellow is trying to access the username and email you type in and then display it using PHP. But the code is saying that name and email are undefined indexs. Can you help me.

That is the first code for the html. It gets the persons name and email.

<html>
<body>

<form action="welcome_get.php" method="get">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>

</body>
</html>




 <html>
 <body>

 Welcome <?php echo $_GET["name"]; ?><br>
 Your email address is: <?php echo $_GET["email"]; ?>

</body>
</html>

This code shows the persons name and email. However when viewing it on my local host it says that it is Undefined index: name in C:\xampp\htdocs\tutorials\welcome_get.php on line 4. Can you help me.

0 Answers0