English

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' - Information Technology

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
Advertisements

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
PHP Form Connectivity with Database
  Is there an error in this question or solution?
Chapter 5: Server-Side Scripting (PHP) - Exercises [Page 78]

APPEARS IN

Balbharati Information Technology (Science) [English] Standard 12 Maharashtra State Board
Chapter 5 Server-Side Scripting (PHP)
Exercises | Q 7.3 | Page 78
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×