Jump to content

jcb789

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by jcb789

  1. Hi everyone for my end of studies projects I decided to do a little e-commerce problem on the filter .. I use an ajax request at the click of the checkbox this goes to my controller which calls a method of my Model class but the concern is that .. if the array $ _POST ['brands'] has several elements then only the last one is returned to me? I thought I saw one day that if the same variable is in a url then the last value will be returned to me is for security but how can I do ... I have been there for too long .. and finally despair. . Help me please... :') request payload: brands%5B%5D=arai&brands%5B%5D=bell reply : <- prepare var_dump () object (PDOStatement) # 2 (1) {["queryString"] => string (73) "SELECT mark FROM articles WHERE categorie_article =? AND mark IN (?,?)"} string (4) "arai" <- bind string (4) "bell" <- bind var_dump () of my fetchAll () array (2) {[0] => array (2) {["brand"] => string (4) "bell" [0] => string (4) "bell"} [1] => array (2 ) {["brand"] => string (4) "bell" [0] => string (4) "bell"}} image_icon since the last value taken into account is bell then I get two items of the bell brand from my bdd but no arai ...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.