Re: form showing old session values after submission

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chrism

    Re: form showing old session values after submission

    Thanks a lot for the detailed reply, Jerry.
    As I was trying out your suggestion, I noticed a flaw in my code:
    Towards the top of the page, before any processing, I set:
    $cart = $_SESSION['cart'];

    So, I think the page is grabbing the previous values of the session
    values and using them, not resetting them according to what the user
    enters into the form. I think that's the problem.

    So, I moved
    $cart = $_SESSION['cart'];
    further down the page after the code that checks for any form values
    and changes the session values to what's in the form.
    This seems to have fixed my problem. At least I think so...for now.
  • Jerry Stuckle

    #2
    Re: form showing old session values after submission

    chrism wrote:
    Thanks a lot for the detailed reply, Jerry.
    As I was trying out your suggestion, I noticed a flaw in my code:
    Towards the top of the page, before any processing, I set:
    $cart = $_SESSION['cart'];
    >
    So, I think the page is grabbing the previous values of the session
    values and using them, not resetting them according to what the user
    enters into the form. I think that's the problem.
    >
    So, I moved
    $cart = $_SESSION['cart'];
    further down the page after the code that checks for any form values
    and changes the session values to what's in the form.
    This seems to have fixed my problem. At least I think so...for now.
    >
    Glad to hear it was so simple!

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...