Passing Hidden Variables
Posted: Sat Aug 03, 2002 8:15 pm
I need help in passing hidden variables. I'd like to know how to correctly incorporate
(my_var being any variable that it should be called to make this thing work) into my php script...
So that my $search variable will continue to be passed on from page to page. This way my users can easily sort their search results without losing the $search variable. I'm really having trouble trying to pass my users search query from page to page... please help!
Code: Select all
<input type="hidden" name="my_var" value="<?php echo $my_var ?>">(my_var being any variable that it should be called to make this thing work) into my php script...
Code: Select all
<!--begin order-->
<form name="order">
<font face="verdana" size="2">Sort By </font>
<select size="1" name="category" style="font-family: Verdana; font-size: 8pt; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" onChange="location=document.order.category.optionsїdocument.order.category.selectedIndex].value;" value="GO">
<option>---------------</option>
<option value="?id=results2&search=<?=$_POSTї'search']?>&order=date&how=desc">Date (DESC)</option>
<option value="?id=results2&search=<?=$_POSTї'search']?>&order=date&how=asc">Date (ASC)</option>
<option value="?id=results2&search=<?=$_POSTї'search']?>&order=name&how=asc">Title (ASC)</option>
<option value="?id=results2&search=<?=$_POSTї'search']?>&order=name&how=desc">Title (DESC)</option>
<option value="?id=results2&search=<?=$_POSTї'search']?>&order=category&how=asc">Category (ASC)</option>
<option value="?id=results2&search=<?=$_POSTї'search']?>&order=category&how=desc">Category (DESC)</option>
</select>
</form>
<!--end order-->
</td>
<td align="left" width="408">
<!--begin search-->
<FORM METHOD="post" ACTION="http://localhost/george/articles/index.php">
<font size="2" face="Verdana">
<input type="submit" value="Title Search" name="Title Search" style="font-size: 7pt; font-family: Verdana; border-style: solid; border-width: 1"> </font>
<input type="text" name="search" size="30" style="font-family: Verdana; font-size: 8pt; border-style: solid; border-width: 1">
</form>
<!--end search-->