View Single Post
  #35  
Old 06-16-2004, 04:45 PM
 
cmtrade cmtrade is offline
 

Advanced Member
  
Join Date: Dec 2003
Location: Florida
Posts: 30
 

Default

Once again, Boomer, I thank you for your curtesy and will to help.
NuAlpha, I thank you too (I tried your version of the logging and it didn't work as well).

I'm not a newbie in php (though I'm not VERY advanced) - I'm modifying things all the time, so I believe I installed the mod correctly.

Here's the code I added:

Code:
# # Insert into orders # db_query("insert into $sql_tbl[orders] (login, total, subtotal, shipping_cost, shippingid, tax, discount, coupon, coupon_discount, date, status, payment_method, flag, details, title, firstname, lastname, company, b_address, b_city, b_state, b_country, b_zipcode, s_address, s_city, s_state, s_country, s_zipcode, phone, fax, email, url, ip) values ('".addslashes($userinfo["login"])."', '$current_order[total_cost]', '$current_order[sub_total]','$current_order[shipping_cost]', '$cart[shippingid]', '$current_order[tax_cost]', '$current_order[discount]', '".addslashes($current_order[coupon])."', '$current_order[coupon_discount]', '".time()."', '$order_status', '".addslashes($payment_method)."', 'N', '".addslashes(text_crypt($order_details))."', '".addslashes($userinfo["title"])."', '".addslashes($userinfo["firstname"])."', '".addslashes($userinfo["lastname"])."', '".addslashes($userinfo["company"])."', '".addslashes($userinfo["b_address"])."', '".addslashes($userinfo["b_city"])."', '".addslashes($userinfo[" b_state"])."', '".addslashes($userinfo["b_country"])."', '".addslashes($userinfo["b_zipcode"])."', '".addslashes($userinfo["s_address"])."', '".addslashes($userinfo["s_city"])."', '".addslashes($userinfo["s_state"])."', '".addslashes($userinfo["s_country"])."', '".addslashes($userinfo["s_zipcode"])."', '".addslashes($userinfo["phone"])."', '".addslashes($userinfo["fax"])."', '$userinfo[email]', '".addslashes($userinfo["url"])."', '$_SERVER[REMOTE_ADDR]')"); $orderid=db_insert_id();

and the second part:

Code:
# # Release previously created lock # func_unlock($LOCK); db_query("UPDATE $sql_tbl[orders] SET ip='$_SERVER[REMOTE_ADDR]' WHERE orderid = '$orderid'"); return $orderids;

Is it correct?

Thanks,
Dan.
Reply With Quote