Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 PHP 新手,如果这个问题听起来很愚蠢,我很抱歉,但我有点困惑。
我有两个 .php 页面
第一个是 browse.php,我有一个 HTML 表单(POST 方法)。
当我提交表单时,我会转到 entry.php(第二页),在与 mysql 交互后出现数据。(假设我得到一个条目表)
在表格的某些单元格中,我想创建一个链接,该链接返回到 browse.php(带有单元格数据)并再次自动提交表单,然后返回到 entries.php
那可能吗?
谢谢
将数据保存在 $_SESSION 变量中
然后通过标头转发到 browser.php
header('Location: http://www.example.com/');
在填充 html 值并通过 javaskript 提交时检查 $_SESSION 参数
像使用 jquery
$('#form').submit(function(){return true;});
其中#form 是您的表单的ID