Here is what I am doing. I have a searchform file that passes variable to a query in another file that processes and displays the results of the query.
This is all working fine. But, now I would like to include the search form right above the query results.
When I include the searchform it displays the results but wipes clean the session. You will see why from the code below.
I was told that I may be able to create a second search for that gets included in the results page that has a variable that handles the session.
I am confused on how to do this.
Basically, all I want to do is give the user the chance to perform another search right from the results page....but I dont want them to loose the previous session....because this screws up the pagination.
I hope I was able to explain this correctly.....my searchform code is below.
<?
session_start();
session_unset();
session_register("selecttown");
?>
<?php
include("head.html");
?>
<center>
Use our search form below too enter information on the type of property you are looking for, and click on 'submit'.<br>
We
will search our database and display the results of your search in just a few seconds.
<form action="newcode.php" method="POST">
<table border="0" width="63%" bgcolor="#FFFFCC">
<tr>
<td width="100%">
<table border="0" width="100%">
<tr>
<td width="20%" bgcolor="#FFFF99" align="center"><strong><font face="Tahoma" size="2">Town</font></strong></td>
<td width="20%" bgcolor="#FFFF99" align="center"><strong>
<font face="Tahoma" size="2">Price Range</font></strong></td>
<td width="20%" bgcolor="#FFFF99" align="center"><strong>
<font face="Tahoma" size="2">Bed Rooms</font></strong></td>
<td width="20%" bgcolor="#FFFF99" align="center"><strong>
<font face="Tahoma" size="2">Baths Rooms</font></strong></td>
</tr>
<tr>
<td width="20%">
<select size="7" name="selecttown" multiple>
<option value="Acworth NH">Acworth, NH</option>
<option value="Charlestown NH">Charlestown, NH</option>
<option value="Claremont NH" selected>Claremont, NH</option>
<option value="Croydon NH">Croydon, NH</option>
<option value="Langdon NH">Langdon, NH</option>
<option value="Lempster NH">Lempster, NH</option>
<option value="Newport NH">Newport, NH</option>
<option value="Unity NH">Unity, NH</option>
<option value="Woodstock VT">Woodstock, VT</option>
</select></td>
<td width="20%">
Enter your lowest price
$<input type="text" name="lowprice" size="20" value="0">
Enter your highest price
$<input type="text" name="highprice" size="20" value="300000">
</select>
</td>
<td width="20%">
<input type="radio" value="%" name="bedroomsel" checked><font face="Courier">Any<br>
<input type="radio" value="1" name="bedroomsel"">1<br>
<input type="radio" value="2" name="bedroomsel"">2<br>
<input type="radio" value="3" name="bedroomsel"">3</font></td>
<td width="20%">
<input type="radio" value="%" name="bathselect" checked><font face="Courier">Any<br>
<input type="radio" value="1" name="bathselect">1<br>
<input type="radio" value="2" name="bathselect">2</font></td>
</tr>
</table>
<p align="center"><input type="submit"><input type="reset"></p>
</form>
</td>
</tr>
</table>
</form>
</center>
<?php
include("foot.html");
?>