Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2. if($_SERVER['REQUEST_METHOD'] == 'POST')
  3. {
  4. $filter1 = strtolower($_POST['select1']);
  5. if($filter1=="man")
  6. {
  7. $ff1 = 'geslacht="man"';
  8. } elseif($filter1=="vrouw") {
  9. $ff1 = 'geslacht="vrouw"';
  10. } else {
  11. $ff1 = "";
  12. }
  13.  
  14. echo 'select * from table where '.$ff1;
  15. }
  16. ?>
  17. <form action="b.php" method="post">
  18. Filter<br>
  19. <select name="select1" style="width: 190px">
  20. <option selected="selected">Selecteer geslacht</option>
  21. <option>Man</option>
  22. <option>Vrouw</option>
  23. </select>
  24. <input type="submit" name="formSubmit" value="Submit">
  25. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement