On Monday, November 3, 2003, at 12:44 AM, Robb Kerr wrote:


I have a two page search. The first page queries a database and creates a
list of MANUFACTURERS from which the visitor can select all, one or
multiple entries. The page is submitted via GET to the second page of the
search. The second page uses the array of selected MANUFACTURERS to create
a selectable list of MODELS from which the visitor can select all, one or
multiple entries. This page is then submitted to the results page via GET.


The problem is that to correctly query the database for results, I need to get the array of selected MANUFACTURERS to
the results page. I'm using a SUBMIT button and don't know how to include
this information in the URL being passed. Any
suggestions?

If you're using a submit button, then you can have a hidden form field:
<form ...>
<input type='hidden' name='manufacturer' value='<?=$_GET['manufacturer']?>' />
<input type='submit' ...>
</form>


of just add it to the URL of the form action:

<form action='nextpage.php' method='get'>
...
</form>

becomes:

<form action='nextpage.php?manifacturer=<?=$_GET['manufacturer']?>' method='get'>
...
</form>


Make sense?

You could also consider sessions, cookies, etc etc.


Justin French


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to