First we have to create a web page that contain a form
<html>
<head>
<title>Form</title>
</head>
<body>
<h2>Registration Form</h2>
<form method="GET" action="infodisplay.php">
Enter Your Name:
<input type="text" name="username"/><br/>
Enter Email Id :
<input type="text" name="email"/><br/>
Enter Your Password :
<input type="password" name="password"/><br/>
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
Then create another file named infodisplay.php and write the below code there :-
<?php
echo "Welcome You are a Member of this Page!<br/>";
$un=$_GET['username'];
$Email=$_GET['email'];
$pw=$_GET['password'];
echo $un."<br/>";
echo $Email."<br/>";
echo $pw;
?>

No comments:
Post a Comment