PHP Price range filters from lowest to highest updated from input -
I was working with all my filters except the price limit inputs I
and ` Value '. "$ Min_price."' 'And' "highest $ highest." ''
But that did not help. Here are the conditions:
$ lowest_price = '0'; $ Supreme_pic = '999999999'; If (empty ($ _ POST ['lowest_price']) === false) {$ minimum_price = $ _POST ['lowest_price']; } If (empty ($ _ POST ['supreme_pris']) === false) {$ supreme_pris = $ _POST ['supreme_pres']; } $ Price_range = "and` value` & gt; = ''. $ Min_pres. '' And `value`
Why are not the items that give input at minimum and highest prices? Any help is greatly appreciated!
Your price range string makes it an integer like before
$ Lowest_price = 0; $ Supreme_pic = 99 99 99 99;
Think more about what type of varchar / text you have to change if your price
field contains the database table in classified
Note: mysql _ *
is now numbered mysqli _ * / code> OR
Pdo
UPDATE 2:
$ lowest_price = '0'; $ Supreme_pic = '999999999'; If (isset ($ _ POST ['lowest_price']) & amp; amp; and trim ($ _ POST ['lowest_price'])! = "") {$ Lowest price = trim ($ _ POST ['lowest_price ']); } If (isset ($ _ POST ['supreme_pris']) & amp; amp; and trim ($ _ POST [' supreme_pres']) = "") {$ supreme_pris = trim ($ _ POST ['supreme_pres ']); } $ Price_range = "and` value` & gt; = $ min_pris and `value`
Comments
Post a Comment