Sankalpa Nirmana Sankalpa Nirmana - 2 months ago 9
HTML Question

PHP get data in separate page

here is my html & php code

<title>Online PHP Script Execution</title>


<h1>Enter Your data</h1>
<form name="frm1" method="post" action="http://localhost:1080/php/sample1.php">
Name : <input type="text" name="uname"><br>
Pass : <input type="password" name="pword"><br>
<input type="submit" name="sub" value="send"><br>

echo "Name : $name<br>";
echo "password : $pw<br>";


this shows the output what i entered.But i want to show that detail in separate page. can i have any suggestions???


The best way to accomplish that is to use _POST, that is fundamental method in PHP!



<form action="site2.php" method="post">
Name: <input type="text" name="name">
Email: <input type="text" name="email">
<input type="submit">




 Hello <?php echo $_POST["name"]; ?>!<br>
 Your mail is <?php echo $_POST["mail"]; ?>.



Hello "name" !

Your email is "" .