Jump to content

Passing Array vars in pagination


Asheeown

Recommended Posts

Why not just put them into a session?

[code]
<?php
//...
$_SESSION['date1'] = (isset($_GET['date1']) ? $_GET['date1') : $_SESSION['date1']);
$_SESSION['date1'] = (isset($_GET['date2']) ? $_GET['date2') : $_SESSION['date2']);

$sql = 'SELECT * FROM `yourtable` WHERE `date` BETWEEN "'.$_SESSION['date1'].'" AND "'.$_SESSION['date2'].'"';
//...
?>
[/code]

Best,

Patrick

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.