Asheeown Posted January 24, 2007 Share Posted January 24, 2007 I have a date, actually two dates that I want to pass through while doing pagination to the next page because I have a WHERE statement that requires them. If they weren't array it would be simple to just put them into the link, any ideas? Link to comment https://forums.phpfreaks.com/topic/35571-passing-array-vars-in-pagination/ Share on other sites More sharing options...
utexas_pjm Posted January 24, 2007 Share Posted January 24, 2007 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 Link to comment https://forums.phpfreaks.com/topic/35571-passing-array-vars-in-pagination/#findComment-168425 Share on other sites More sharing options...
Asheeown Posted January 24, 2007 Author Share Posted January 24, 2007 Perfect exactly what I was looking for thanks Link to comment https://forums.phpfreaks.com/topic/35571-passing-array-vars-in-pagination/#findComment-168447 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.