Input field for pagination
2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: December 2, 2013 (RSS)
By proba - December 2, 2013
Hello,
one quick question - Is there a way to make form for change page number with input field value? I mean after search :)
Example: my url - list.php?offer=sell&price_min=&price_max=&submit=Submit&page=3 . I want to have form with input field where i can put some value like "9" and my url change to this - list.php?offer=sell&price_min=&price_max=&submit=Submit&page=9 .
Want to save my search criteria and change only page number.
Thanks
By Daryl - December 2, 2013
Hi proba,
What I would do is I will put each search values into a hidden fields with the same field name together with the text field for entering the page number.
For example:
<form>
<input type="hidden" name="offer" value="<?php echo @$_REQUEST['offer']; ?>">
<input type="hidden" name="price_min" value="<?php echo @$_REQUEST['price_min']; ?>">
<input type="hidden" name="price_max" value="<?php echo @$_REQUEST['price_max']; ?>">
<input type="hidden" name="submit" value="Submit">
<input type="text" name="page" value="<?php echo @$_REQUEST['page']; ?>">
</form>
Hope this helps!
Cheers!
PHP Programmer - interactivetools.com