anthony-needs-you Posted January 5, 2009 Share Posted January 5, 2009 Hi everyone, i am trying to create a search fuction with a price range. The html for the price range is: <select name="pricerange" class="field"> <option selected="selected">any price</option> <option value="0:100">£0 - £100</option> <option value="101:300">£101 - £300</option> <option value="301:500">£301 - £500</option> </select> and the php is list($min,$max) = explode(':',$_POST['pricerange'],2); $result = mysql_query("SELECT departureDate, expireDate, airport, destination, resort, hotel, duration, board, price, description, customerRef, mystiqueRef, stars FROM holiday WHERE destination LIKE '%$where%' AND duration LIKE '%$stay%' AND price BETWEEN '%$min' AND '%$max'"); The price range is not working? Link to comment https://forums.phpfreaks.com/topic/139588-solved-price-range/ Share on other sites More sharing options...
rhodesa Posted January 5, 2009 Share Posted January 5, 2009 remove the % before $min and $max Link to comment https://forums.phpfreaks.com/topic/139588-solved-price-range/#findComment-730239 Share on other sites More sharing options...
anthony-needs-you Posted January 5, 2009 Author Share Posted January 5, 2009 you star, thanks Link to comment https://forums.phpfreaks.com/topic/139588-solved-price-range/#findComment-730243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.