in reply to Re^2: Global Variables Not Acting Global
in thread Global Variables Not Acting Global

If both are set, of course the value is 0 again -- one of them takes care of increment, one of decrementing. Both add up to 0 in the end.
  • Comment on Re^3: Global Variables Not Acting Global

Replies are listed 'Best First'.
Re^4: Global Variables Not Acting Global
by rbhyland (Acolyte) on Apr 21, 2011 at 11:51 UTC
    Only one gets set at a time. There is a form on the bottom with 2 submit buttons. Depending on which button redisplays the form, CurIDPtr is incremented or decremented. Problem is, the value of CurIDPtr is reset every time the form loads. I think I just figured that part out...
      Problem is, the value of CurIDPtr is reset every time the form loads.

      Of course. Each page load starts the CGI script anew, and the variable, while global, is not persistent.