PagePost1.php
<form action="PagePost2.php" method="post" name="form1"> Name <input name="txtName" type="text"> SiteName <input name="txtSiteName" type="text"> <input type="submit" name="Submit" value="Submit"> </form>
PagePost2.php
<form action="PagePost3.php" method="post" name="form1"> <?php echo $_POST["txtName"]."<br>"; // txtName echo $_POST["txtSiteName"]."<br>"; // txtSiteName echo "<hr>"; ?> <input name="txtName" type="hidden" value="<?=$_POST["txtName"];?>"> <input name="txtSiteName" type="hidden" value="<?=$_POST["txtSiteName"];?>"> <input type="submit" name="Submit" value="Submit"> </form>
PagePost3.php
<?php echo $_POST["txtName"]."<br>"; // txtName echo $_POST["txtSiteName"]."<br>"; // txtSiteName echo "<hr>"; foreach($_POST as $key => $val) // All Key & Value { echo $key . " : " . $val . "<br>"; } ?>