Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>You have selected</title>
- </head>
- <body>
- <style>
- body {background-image: url("margarita cookies.jpg")}
- </style>
- <?php
- $host="localhost";
- $username="alcohaul";
- $password="drunk";
- $database="alcohaul";
- $link= mysqli_connect($host,$username,$password,$database);
- $select='SELECT * FROM master';
- if (isset($_GET['type']) || isset($_GET['happy_hour']) || isset($_GET['flavor']) || isset($_GET['area']) || isset($_GET['rest'])){
- $select.=' where';
- }
- if (isset($_GET['type']) && ($_GET['type'] != ' ')){
- $select.=' type_id = ' . $_GET['type'];
- if (isset($_GET['happy_hour']) || isset($_GET['flavor']) || isset($_GET['area']) || isset($_GET['rest'])){
- $select.=' and';
- }
- }
- if (isset($_GET['happy_hour']) && ($_GET['happy_hour] !=' ')){
- $select.=' happy_hour_id = ' . $_GET['happy_hour'];
- if (isset($_GET['flavor']) || isset($_GET['area']) || isset($_GET['rest'])){
- $select.=' and';
- }
- }
- if (isset($_GET['flavor']) && ($_GET['flavor'] !=' ')){
- $select.=' flavor_id = ' . $_GET['flavor'];
- if (isset($_GET['area']) || isset($_GET['rest'])){
- $select.=' and';
- }
- }
- if (isset($_GET['area']) && ($_GET['area'] !=' ')){
- $select.=' area_id = ' . $_GET['area'];
- if (isset($_GET['rest'])){
- $select.=' and';
- }
- }
- if (isset($_GET['rest']) && ($_GET['rest'] !=' ')){
- $select.=' rest_id = ' . $_GET['area'] . ;
- }
- $search=mysqli_query($link,$select);
- while ($row=mysqli_fetch_array($search)) {
- print "$row[master_id]<br/>";
- }
- mysqli_close($link);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement