Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <body>
  4. <form id="form1" method="post" action= "">
  5. <div style="padding:20px">
  6. <select id="bedroom" multiple="multiple" name="bedroom[]">
  7. <option value="2bhk" selected="selected">2bhk</option>
  8. <option value="3bhk" >3bhk</option>
  9. </select>
  10.  
  11. <select id="prop-type" multiple="multiple" name="ptype[]">
  12. <option value="residential" >Residential Apartments</option>
  13. <option value="commercial" >Commercial Apartments</option>
  14. </select>
  15. <script type="text/javascript">
  16. $(function() {
  17. $('select').multiselect({
  18. });
  19. $('#btnget').click(function() {
  20. alert($('#chkveg').val());
  21. })
  22. });
  23. </script>
  24. </div>
  25. <input type="submit" value="submit" name="submit"/>
  26. </form>
  27. </body>
  28. </html>
  29.  
  30. <?php
  31.  
  32. if(isset($_POST['submit'])) {
  33.  
  34. $bedrooms = implode('',$_POST['bedroom']);
  35. $property = implode('-',$_POST['ptype']);
  36.  
  37. $url = "search/".$bedrooms."-".$property."";
  38. header('Location: '.$url);
  39.  
  40. }
  41. ?>
  42.  
  43. <?php
  44. $url = $_SERVER['REQUEST_URI'];
  45. $url1 = explode("-",substr($url,1));
  46. foreach($url1 as $val){
  47. echo $val;
  48. }
  49. ?>
  50.  
  51. <IfModule mod_rewrite.c>
  52. RewriteEngine on
  53. RewriteBase /
  54.  
  55. RewriteRule ^search/([^/.]+)/?$ /welworth-search/search.php?q=$1 [NC,L]
  56. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement