我想下载搜索查询后显示的数据。
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
是搜索查询日期的输入字段
答案 0 :(得分:0)
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();