View Single Post
  #12  
Old 06-07-2019, 10:33 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: altered carts OnSale mod for php 7+

So i've made a few changes to the OnSale mod to try and get it in line with php7.2 and here one I'm stuck on... I currently have
Code:
if (db_query("UPDATE xcart_onsale SET begin='$begin', end='$end', saletype='$saletype', criteria='".addslashes(serialize($product_criteria))."', coupon_code='$coupon_code', uses='$times_to_use', home_display='$home_display', onsale_product_display='$onsale_product_display', onsale_display='$onsale_display', per_customer='$per_customer', productids='$productids', catids='$catids', provider='$login', status='".mysqli_real_escape_string($sale_status)."' WHERE onsaleid='$edit_update'")){
and get the error
Quote:
Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /home/keyston1/public_html.dev/admin/onsale.php on line 677

Apparently I need to add the connection to the db in the mysqli function part
Code:
.mysqli_real_escape_string($my_connection,$sale_status)
I'm not sure what $my_connection should actually say...?
and am I headed in the right direction?
Thanks.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote