|
Posted by BootNic on 12/19/06 06:15
> PseudoMega <pseudomega@gmail.com> wrote:
> news: 1166501195.140630.318910@79g2000cws.googlegroups.com
> I'm working with a PHP page I wrote which searches through records in
> a MySQL database.
>
> I have a <form method="post"> which currently passes all of search
> variables into the session array. I'd like to change the form to GET
> instead of POST so that all of the variables are in the URL.
>
> My problem is that I have already been using pagination code which
> creates links like <a href="?page=2">. With all of the other
> variables in the session array, it works fine. But moving to the GET
> method, I need to append that "?page" variable to the existing URL
> with the other variables.
>
> I think I may have skipped over this chapter in all of my studies
> because I just have no idea how to pull it off :)
>
> Can anyone point me in the right direction?
<form action="<?= $PHP_SELF ?>">
<div>
<?
foreach ($_GET as $key => $value) {
print ('<input type="hidden" name="get_'.$key.'" value="'.$value.'">
');
}
?>
<input type="text" name="willy">
<input type="submit"></div>
</form>
--
BootNic Tuesday, December 19, 2006 1:15 AM
Hackers make toys. Crackers break them.
*Peter Seebach*
Navigation:
[Reply to this message]
|