Advertisements
Advertisements
Question
Write Programs for the following.
Create a website with two PHP webpage in which each webpage is connected.
The first page of the website contains two form fields for taking 'name' and 'password' from users. On onclick event, details of forms should be displayed on second webpage.
Answer in Brief
Solution
Coding:
Form.html
<html>
<body>
<form action="wc.php" method="post">
Enter Name
<input type="text" name="name"><br><br>
Enter Password
<input type="password" name="pass"><br><br>
<input type="submit" name= "submit" value="Submit">
</form>
</body>
</html>
wc.php
<html>
<body>
Welcome
<?php
echo $_POST["name"]; ?> <br><br>
Your Password is
<?php
echo $_POST["pass"];
?>
shaalaa.com
Is there an error in this question or solution?