Jump to content

Mikl95

New Members
  • Posts

    1
  • Joined

  • Last visited

Mikl95's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi PHPfreaks! I'am a total noob when it comes to programming, i can read and write a bit of HTML, but thats it. I need help with creating a new undersite for my webpage http://findaphone.dk where you'll be able to watch all models instead of only the ones that matches your answers. The original idea behind the page, were that you could get help finding the smartphone that matches your preferences, but as I see the aren't really converting, i will give the users the ability to go to a page where they can see all models that we offer on the site. I think coding wise, it should be pretty simple, because the code is already written, but instead of sorting of phones, as it does now, it should simply show all available opportunities. My PHP code looks like this right now: // Main First Search (4 Questions) public function filter() { $price = $this->input->post('price'); if ($price == '3000') { $price2 = '0'; } else if ($price == '5500') { $price2 = '3000'; } else if ($price == '6000') { $price = '10000'; $price2 = '3500'; } $size = $this->input->post('size'); $type = $this->input->post('type'); $design = $this->input->post('design'); //echo "SELECT * FROM `product_info` WHERE `ac_price` > $price2 AND `ac_price` <= $price AND `design` = '$type' AND `size` = '$size' AND `type` = '$design' GROUP BY `id` ORDER BY `rating` DESC";die; $filter = $this->queries->custom("SELECT * FROM `product_info` WHERE `ac_price` > $price2 AND `ac_price` <= $price AND `design` = '$type' AND `size` = '$size' AND `type` = '$design' GROUP BY `id` ORDER BY `rating` DESC"); if ($filter == null) { echo ''; } I think thats the part where the site chooses the phones that matches the answers from the database. If not please tell me how it should look like. Thanks for your help in advance!!
×
×
  • 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.