Failed to load resource: the server responded with a status of 404 (Not Found) in the file domain name.com.com / wp-content / themes / draco / getPrice.php? Yrs = 1 & pcs = 1 & pid = 82

GetPrice.php file code

<?php require($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php'); global $wpdb; //$price = $wpdb->get_results($wpdb->prepare("SELECT price FROM prices where years = ".$_GET['yrs']." and pcs = ".$_GET['pcs']." and product_id = ".$_GET['pid']." limit 1 ")); $price = $wpdb->get_results($wpdb->prepare("SELECT price FROM prices, buy_link where years = ".$_GET['yrs']." and pcs = ".$_GET['pcs']." and product_id = ".$_GET['pid']." limit 1 ")); header('Content-Type: application/json'); http_response_code(200); echo json_encode($price); ?> 

When you change the price in select knocks error.

jquery.min.js: 4 GET http://bitdefender.com.ua/wp-content/themes/draco/getPrice.php?yrs=1&pcs=3&pid=82 404 (Not Found) jquery.min.js: 4 sendjquery .min.js: 4 n.extend.ajax (index): 45 get_price (index): 229 onchange

All this on the page - http://bitdefender.com.ua/product/bitdefender- antivirus - plus - 2015/

Screenshot: enter image description here

Tell me what could be the problem. In advance, great Arigato!

  • one
    There is no such file at this address - etki
  • When there is no - 404 error. And here everything is ok - bitdefender.com.ua/wp-content/themes/draco/… - Stanislav Kucher
  • Firstly, there is a 404 error here. Secondly, I went through your link and got the same 404. - etki
  • @ StanislavKucher, not everything is ok, because The answer is = 404, see pastebin.com/f97Tv2ek - SanŚ́́́́́́́́́́́-
  • one
    @StanislavKucher, and by the way, WTF? SELECT price FROM prices, buy_link where years = ". $ _ GET ['yrs'].". I don’t know how magical the $ wpdb-> prepare function is, but you are inserting data from a request into a request in one request, isn’t it better to use parameters? - SanŚ́́́́́́́́́́́́́́́́́́́́́́́́

0