<html>
<body>
<form action="slip_10-1.php" method="post">
<center>
Enter Students information :
<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>Class : </td><td><input type="text" name="class"></td></tr>
<tr><td></td><td><input type="submit" value=Next></td></tr>
</table>
</center>
</form>
</body>
</html>
Php file :
Slip_10-1.php :
<html>
<body>
<form action="slip_10-2.php" method="post">
<center>
<h2>Enter Marks for Student:</h2>
<table>
<tr><td>Java : </td><td><input type="text" name="m1"></td><tr>
<tr><td>PHP : </td><td><input type="text" name="m2"></td></tr>
<tr><td>ST : </td><td><input type="text" name="m3"></td></tr>
<tr><td>IT : </td><td><input type="text" name="m4"></td</tr>
<tr><td>Practical : </td><td><input type="text" name="m5</td</tr>
<tr<td>Project : </td<td<<input type="text" name="m6</td</tr>
<tr><td></td><td><input type="submit" value=Next></td></tr>
</table>
</center>
</form>
</body>
</html>
<?php
setcookie("stud1",$_POST['name'],time()+3600);
setcookie("stud2",$_POST['addr'],time()+3600);
setcookie("stud3",$_POST['class'],time()+3600);
?>
Slip_10-2.php :
<?php
echo "<h3>Marksheet</h3> ";
echo "Name : ".$_COOKIE['stud1']."
";
echo "Address : ".$_COOKIE['stud2']."\n";
echo "Class : ".$_COOKIE['stud3']."\n";
echo "Java : ".$_POST['m1']."\n";
echo "PHP : ".$_POST['m2']."\n";
echo "ST : ".$_POST['m3']."\n";
echo "IT : ".$_POST['m3']."\n";
echo "Practical : ".$_POST['m3']."\n";
echo "Project : ".$_POST['m3']."\n";
?>