I am trying to get the form values when clicking on the submit button, but when I run this, I get the below error:
Notice: Undefined variable: mail in C:\xampp\htdocs\mylearning\add_user.php on line 20
Here is my code:
<html>
<head>
<title> I am learning </title>
</head>
<body>
<form name="new_user" method="post" action="add_user.php">
<input type="text" name="mail"/> <br />
<input type="text" name="name"/><br/>
<input type="submit" name="submitbtn" value="continue"/>
</form>
</body>
</html>
<?php
if(isset($_POST["submitbtn"]))
$mail = isset($_POST['mail']);
$name1 = isset($_POST['name']); echo "Returned value from the function : $name1"; echo "Returned value from the function : $mail";
?>