gpt4 book ai didi

php - 如何将输入字段的值从一页获取到另一页?

转载 作者:行者123 更新时间:2023-11-29 03:23:58 25 4
gpt4 key购买 nike

我想下载搜索查询后显示的数据。

require 'conn/Session.php';
require 'conn/MySQL.php';
require_once("includes/paging.inc.php");
require_once("classes/class.SiteManager.php");
$dbcon = new MySQL();
$siteObj = new SiteManager();
require 'conn/checkSession.php';
$paging = new Pager;
$id = $_POST['id'];
$from=$_REQUEST['$s'];
$to=$_REQUEST['$v'];
$result = mysql_query('SELECT * FROM `reports` WHERE date BETWEEN "$from" and "$to"' );

echo $result;
die();

这里我无法获取 $from$to 的值,其中 $v$s 是搜索查询中日期的输入字段

最佳答案

require 'conn/Session.php';
require 'conn/MySQL.php';
require_once("includes/paging.inc.php");
require_once("classes/class.SiteManager.php");
$dbcon = new MySQL();
$siteObj = new SiteManager();
require 'conn/checkSession.php';
$paging = new Pager;
$id = $_POST['id'];
$from=$_GET['s']; // $_POST['s']
$to=$_GET['v']; // $_POST['v']
$result = mysql_query("SELECT * FROM reports WHERE date BETWEEN $from and $to");

echo $result;
die();

关于php - 如何将输入字段的值从一页获取到另一页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39364975/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com