Html file -
<html>
<body>
<form action="slip_7_Q3_1.php" method="post">
<center>
<h2>Enter Employee Details :</h2>
<table>
<tr><td>Name : </td><td><input type="text" name="name"></td><tr>
<tr><td>Address : </td><td><input type="text" name="addr"></td></tr>
<tr><td>Mobile No : </td><td><input type="text" name="mob_no"></td></tr>
<tr><td></td><td><input type="submit" value=Next></td></tr>
</table>
</center>
</form>
</body>
</html>
Php file -
slip_7_Q3_1.php
<html>
<body>
<form action="slip_7_Q3_2.php" method="post">
<center>
<h2>Enter LIC Information :</h2>
<table>
<tr><td>Policy no. : </td><td><input type="text" name="p_no"></td><tr>
<tr><td>Policy Name : </td><td><input type="text" name="p_name"></td></tr>
<tr><td>Premium : </td><td><input type="text" name="premium"></td></tr>
<tr><td></td><td><input type="submit" value=Next></td></tr>
</table>
</center>
</form>
</body>
</html>
<?php
setcookie("emp1",$_POST['name'],time()+3600);
setcookie("emp2",$_POST['addr'],time()+3600);
setcookie("emp3",$_POST['mob_no'],time()+3600);
?>
Php file :
slip_7_Q3_2.php
<?php
echo "<h3>Employee Details</h3> ";
echo "Name : ".$_COOKIE['emp1']."<br>";
echo "Address : ".$_COOKIE['emp2']."<br>";
echo "Mobile No. : ".$_COOKIE['emp3']."<br>";
echo "Policy no. : ".$_POST['p_no']."<br>";
echo "Policy Name : ".$_POST['p_name']."<br>";
echo "Premium : ".$_POST['premium']."<br>";
?>