Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_SERVER['REQUEST_METHOD'] == 'POST')
- {
- $filter1 = strtolower($_POST['select1']);
- if($filter1=="man")
- {
- $ff1 = 'geslacht="man"';
- } elseif($filter1=="vrouw") {
- $ff1 = 'geslacht="vrouw"';
- } else {
- $ff1 = "";
- }
- echo 'select * from table where '.$ff1;
- }
- ?>
- <form action="b.php" method="post">
- Filter<br>
- <select name="select1" style="width: 190px">
- <option selected="selected">Selecteer geslacht</option>
- <option>Man</option>
- <option>Vrouw</option>
- </select>
- <input type="submit" name="formSubmit" value="Submit">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement