jdrivie Posted October 11, 2006 Posted October 11, 2006 I have a need to enter shipping addresses for my employees from one spot. I have been able to create a list of users and a link with their cID in it to the address_book_process.php but I can't get it to add the address under the correct id. It adds 0 as the customers_id. Here is the piece of code in address_book process.php that needs to be able to identify the customers_id in the link. tep_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '" . (int)$cID . "'"); } } else { $sql_data_array['customers_id'] = $cID; it is right below: if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender; I added the $cID and I have tried every other combination I can think of but no luck yet. Any help or ideas would be welcomed. Joe
Daemonj Posted October 11, 2006 Posted October 11, 2006 The variable cID is not defined or is being reset before the query you listed above executes. Have you tried using $customer_id instead? "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
jdrivie Posted October 11, 2006 Author Posted October 11, 2006 The variable cID is not defined or is being reset before the query you listed above executes. Have you tried using $customer_id instead? Thanks for the reply. I should have stated that the cID is contained in the link from the page where I select the user. The cID works on a different db query I have in address_book_process.php.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.