Parcourir la source

added sort to top of search page

main
Simon Bowie il y a 2 ans
Parent
révision
973e5fc811
1 fichiers modifiés avec 16 ajouts et 0 suppressions
  1. +16
    -0
      site/public/search.php

+ 16
- 0
site/public/search.php Voir le fichier

@@ -26,6 +26,22 @@ include '../text_functions.php';

<div class="container">

<div class="row p-3">
<form action="search.php" method="POST">
<input type="hidden" name="search" value="<?php echo $_POST["search"]?>">
<input type="hidden" name="searchopt" value="<?php echo $_POST["searchopt"]?>">
sort by:
<select name="sort" id="sort" onchange="this.form.submit()">
<option value="relevance" <?php if($_POST["sort"] == 'relevance') echo "selected"; ?>>relevance</option>
<option value="year" <?php if($_POST["sort"] == 'year') echo "selected"; ?>>year</option>
</select>
<noscript>
<input type="submit" class="btn btn-default" value="Set" />
</noscript>
</form>
</div>
<hr>

<?php

$search_results = solr_search($_POST["search"], $_POST["searchopt"], $_POST["sort"]);

Chargement…
Annuler
Enregistrer