my $dbh = manageusers::OpenConnection();
warn("update_tables.cgi after open connection");
# Dispatch to proper action based on user selection
my $count = 0;
my $query = new CGI;
my $cgiURL = CGI::url();
my $action = lc ($query->param('action'));
my $userid_1 = 0;
###############################################################
$userid_1 = $manageusers::LoggedOn_user_id; <-------------------------
It is clear you are still unaware of what is actually going on. So which program are you talking about? the one that calls main/logon or the one that identifies itself as update_tables.cgi and doesnt? It seems to you they are both the same program but they are not.
I did not say I did. I have done that by passing a variable to the new program
Yes you did say that. You say you expect a new program to remember the state of a previously terminated program. So how do you think you pass a parameter to a cgi program? via cookies and sessions or form params of course.
I don't consider the cgi scripts and associated modules as "different programs"
Each cgi script is its own standalone program started from scratch each time the browser goes to that page, no matter if it is by clicking on a link and changing the address bar address or executing something like MyIFrame.src = "https://www.jala-mi.org/httpsdocs/cgi-bin/update_tables.cgi?action=" + MySource; When you executed that you started a new program, from scratch but it is perfectly clear you still dont understand that. I had thought you got that clue when you were complaining that update_tables.cgi took over the whole page when you started it via self.location='https://www.jala-mi.org/httpsdocs/cgi-bin/update_tables-development.cgi?action=updatetable_3' and we showed you why that was the problem
That aside, it is working perfectly using Storable ... I could have done that but chose another way
So one user logs in as admin, and then any one that tries to go to http://www.jala-mi.org/httpsdocs/jala_AdminCore.htm will have admin rights to do whatever they want because the storable file is still around. Or you go thru login, then another person goes thru login which then changes the storable file and now you cant access update_tables.cgi anymore. I guess to you that is working perfectly, its just clear you still dont understand the async nature of cgi programs and how web pages work. Login, then try flushing your cookies and close your browser. then open a new browser and go to the admincore page and try pressing a few buttons, is that how you want things to work? with no cookies and a new browser session you cant be logged in, right? So now do you get it that until the next person logs in anyone that goes to the admincore page will have admin rights?
|