Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Bootstrap Example</title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- </head>
- <body>
- <div class="container">
- <h2>Recherche Annonce</h2>
- <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
- <div class="form-group">
- <label for="ville">Ville :</label>
- <select class="form-control" name="ville">
- <option value="Tunis">Tunis</option>
- <option value="Ariana">Ariana</option>
- <option value="Mannouba">Mannouba</option>
- <option value="Bizerte">Bizerte</option>
- <option value="Ben Arous">Ben Arous</option>
- </select>
- </div>
- <br>
- <div class="form-group">
- <label for="ville">Catégorie :</label>
- <label class="radio-inline">
- <input type="radio" name="categorie" value="auto">Automobile
- </label>
- <label class="radio-inline">
- <input type="radio" name="categorie" value="info">Informatique
- </label>
- <label class="radio-inline">
- <input type="radio" name="categorie" value="divers">Divers
- </label>
- </div>
- <button type="submit" class="btn btn-default" name="btn_chercher">Chercher</button>
- <button type="reset" class="btn btn-default" name="btn_annuler"/>Annuler</button>
- </form>
- </div>
- <?php
- if(isset($_POST['btn_chercher'])):
- include_once('../lib/annonce.class.php');
- $annonce=new annonce();
- extract($_POST);
- $annonce->ville=$ville;
- $annonce->categorie=$categorie;
- if($donnees=$annonce->searchAnnonce()) include_once('chercher_annonce.phtml');
- else echo 'Nope';
- endif;
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement