MS Explorer not passing ARRAY data but Firefox does

Discussion in 'Customization & add-ons' started by dereck_j2, Mar 27, 2008.

  1. dereck_j2

    dereck_j2 Member

    Joined:
    Aug 22, 2006
    Messages:
    42
    Hi all.

    I have a support ticket active for this problem but I would like to get the responce from the forum.

    I am having a problem in getting my script to work correctly. Below you will see the changes I have made to signup.php. I have added:

    $coupin_no = $vars['coupon']; SEE BOLD BELOW
    $_SESSION['coupondis'] = $coupin_no; SEE BOLD BELOW
    $_SESSION['member'] = $member_id; SEE BOLD BELOW

    Those to session variables are used in the thanks.php script after payment has been processed.

    The problem I am having is the script works as required in FIREFOX 2.00.12, but not in MS EXPLORER Ver 7.

    If I use print_r ($_SESSION); at the start of the script thanks.php using FIREFOX, all the ARRAY variables are displays.

    But when using MS EXPLORER the ARRAY is empty.

    Can you think of a reason why this is happening?

    Any advice you can offer would be good. Again, many thans for your help and support with this matter.

    Best regards

    Dereck

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++



    // do payment !

    $product_id = $vars['product_id'];

    $login = $vars['login'];

    $paysys_id = $vars['paysys_id'];

    $coupin_no = $vars['coupon'];



    do { // to easy exit using break()

    foreach ((array)$vars['product_id'] as $pid){

    $product = $db->get_product($pid);

    if (!in_array($product['scope'], $signup_scope_allowed)){

    $error = _SIGNUP_INCORRECT_PRODID;

    break;

    }

    ////////////// check products scope

    }

    if ($error = check_product_requirements((array)$vars['product_id']))

    break;

    $member_id = $db->check_uniq_login($vars['login'], $vars['email'], $vars['pass0'], 1);

    $member_id_exists = 0;

    if ($config['verify_email'])

    $vars['email_verified'] = -1;

    if ($GLOBALS['_LANG_SELECTED'] != get_default_lang()){

    $vars['selected_lang'] = $GLOBALS['_LANG_SELECTED'];

    }

    if ($member_id < 0) {

    $member_id = $db->add_pending_user($vars);



    /* No unsubscribe new members!

    if (!$vars['to_subscribe']){

    $member = $db->get_user($member_id);

    $member['unsubscribed']='1';

    $db->update_user($member_id, $member);

    }

    */



    $is_affiliate = '0'; //only member

    if ($db->get_signup_threads_c($is_affiliate) && $vars['to_subscribe'])

    $db->subscribe_member ($member_id, $is_affiliate);

    }

    elseif (!$member_id)

    die(_SIGNUP_LOGIN_EXISTS);

    else {

    $member_id_exists++; //we found existing user with the same params

    // then will clean CC parameters if any

    if ($config['allow_second_signup'] && $db->get_user_payments($member_id,1)) {

    } else {

    $member = $db->get_user($member_id);

    $member['data']['cc-hidden']='';

    $member['data']['cc-expire']='';

    $member['data']['cc']='';

    $member['data']['cc_street']='';

    $member['data']['cc_city']='';

    $member['data']['cc_state']='';

    $member['data']['cc_zip']='';

    $member['data']['cc_country']='';

    foreach ($vars as $k=>$v) $member[$k] = $v;

    $db->update_user($member_id, $member);

    }

    }

    if ($error) {

    break;

    }



    $price = calculate_price($product_id, $member_id, $vars, $prices);

    if ($GLOBALS['COUPON_CODE'])

    $vars['COUPON_CODE'] = $GLOBALS['COUPON_CODE'];

    $additional_values = array();

    foreach ($payment_additional_fields as $f){

    $fname = $f['name'];

    if (isset($vars[$fname]))

    $additional_values[$fname] = $vars[$fname];

    }

    $additional_values['COUPON_DISCOUNT'] = $GLOBALS['COUPON_DISCOUNT'];

    $_SESSION['coupondis'] = $coupin_no;

    $_SESSION['member'] = $member_id;


    $additional_values['TAX_AMOUNT'] = $GLOBALS['TAX_AMOUNT'];

    $additional_values['TAXES'] = $GLOBALS['TAXES'];

    if (is_array($product_id)) {

    $product = & get_product($product_id[0]);

    if (preg_match('/^\d\d\d\d-\d\d-\d\d$/', $product->config['start_date']))

    $begin_date = $product->config['start_date']; /// fixed start date

    else

    $begin_date = date('Y-m-d');

    $expire_date = $product->get_expire($begin_date); //yyyy-mm-dd

    $payment_id = $db->add_waiting_payments($member_id, $product_id,

    $paysys_id, $price, $prices, $begin_date, $expire_date, $vars,

    $additional_values);

    } else {

    $product = & get_product($product_id);

    if (preg_match('/^\d\d\d\d-\d\d-\d\d$/', $product->config['start_date']))

    $begin_date = $product->config['start_date']; /// fixed start date

    else

    $begin_date = date('Y-m-d');

    $expire_date = $product->get_expire($begin_date); //yyyy-mm-dd

    $payment_id = $db->add_waiting_payment($member_id, $product_id,

    $paysys_id, $price, $begin_date, $expire_date, $vars,

    $additional_values);

    }

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++




    Many thanks for any help you can give.



    Dereck
  2. dereck_j2

    dereck_j2 Member

    Joined:
    Aug 22, 2006
    Messages:
    42
    Hi all.

    I have been testing my custom script out on IE 6, IE 7, FireFox 2.0.0.12 and Netscape 9.0.0.6.

    The script performs correctly on IE 6 and FirFox 2.0.0.12 but not on the others.

    Does anyone know of any problems IE 7 would cause.

    Many thanks

    Dereck

Share This Page