Guest User

Untitled

a guest
May 14th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. <div class="top">
  2.     <form id="filter" method="get">
  3.         <select class="select" id="section" onchange="window.location.href=this.options[this.selectedIndex].value">
  4.             <option> </option>
  5.             <?
  6.             $sqlFilter = "SELECT `text`,`id` FROM dealSectionParent";
  7.             $sqlFilter = mysql_query($sqlFilter);
  8.             while ($rowFilter = mysql_fetch_object($sqlFilter)) {
  9.                 if($rowFilter->id == $_GET['sectionParent'] ){
  10.                 ?>
  11.                     <option selected value="<?echo $siteurl ?>/templates/deals/deals.php?sectionParent=
  12.                 <? echo $rowFilter->id; ?>" checked>
  13.                             <? echo $rowFilter->text;?></option>
  14.                 <?
  15.                 }else{
  16.                 ?>
  17.                     <option value="<?echo $siteurl ?>/templates/deals/deals.php?sectionParent=
  18.                 <? echo $rowFilter->id; ?>">
  19.                             <? echo $rowFilter->text;?></option>
  20.                 <?
  21.                 }
  22.             };
  23.             ?>
  24.         </select>
  25.     </form>
  26. </div>
Advertisement
Add Comment
Please, Sign In to add comment