I have added two fields to my customers table: customers_account_name & customers_account_number
I want to add these as $_SESSION variables at login, so I edited /includes/modules/pages/login/header.php and added the following code:
about line 47: get customer info
about line 84: create session variablesCode:// Check if email exists $check_customer_query = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, customers_authorization, customers_referral, customers_account_number, customers_account_name FROM " . TABLE_CUSTOMERS . " WHERE customers_email_address = :emailAddress";
This DOES create the $_SESSION[] variables, but they are empty. It looks straight forward, so I don't know what I'm missing.Code:$_SESSION['customer_id'] = $check_customer->fields['customers_id']; $_SESSION['customer_default_address_id'] = $check_customer->fields['customers_default_address_id']; $_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization']; $_SESSION['customer_first_name'] = $check_customer->fields['customers_firstname']; $_SESSION['customer_last_name'] = $check_customer->fields['customers_lastname']; $_SESSION['customer_country_id'] = $check_country->fields['entry_country_id']; $_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id']; // added fields $_SESSION['customers_account_number'] = $check_customer->fields['customers_account_number']; $_SESSION['customers_account_name'] = $check_customer->fields['customers_account_name'];
I can echo any of the other $_SESSION variable and get the expected value, so I don't know why these two are blank when the values are entered correctly in the customers table...????
Would really appreciate any help getting this right!
Thanks,
Chadderuski



