如何将数据传递到php中的第3页? [英] How pass data to 3rd page in php?

查看:72
本文介绍了如何将数据传递到php中的第3页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3页

1)第1页包含学生姓名

2)第2页包含学生成绩

3)所有数据在第1页和第2页显示学生姓名和成绩

I have 3 pages
1) 1st page contain student name
2) 2nd page contain student grades
3) all data in pages 1st and 2nd display student name and grades

推荐答案

您使用表格的get或post方法将数据提交到另一页,使用
You use get or post method of form to submit data to another page, use


_GET或


_POST接收数据,然后使用隐藏的输入类型来保存数据。例如:



1.在第1页,

_POST to receive the data, and then use hidden input type to hold the data. For example:

1. in page 1,
<form method="get" action="page2.php">
<input type="text" name="studentname" value="peter">
<input type="submit" name="submit" value="Submit>





2.在page2.php中:



2. in "page2.php":

<form method="get" action="page3.php">
<input type="text" name="grade" value="A">
<input type="hidden" name="hiddenstudentname" value="<?php  echo


这篇关于如何将数据传递到php中的第3页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆