I have never had such a problem in other languages

For some reason i doubt that. If you call a c program that starts another program via a system call do you expect the second program to have access to the variables of the first program. when you say

MyIFrame.src = "https://www.jala-mi.org/httpsdocs/cgi-bin/update_table +s.cgi?action=" + MySource;
you are starting a whole new perl instance, with the script called update_tables.cgi. All the data associated with the perl instance that sent http://www.jala-mi.org/httpsdocs/jala_AdminCore.htm to the browser has been lost if not stored somewhere else like a sessions table because that instance ended when it sent that page to your browser. This is true in c or python as well as you would know if you were a c or python programmer. This is simple cgi programming protocol.

So like any other cgi program update_tables.cgi needs to check its cookies and load its session object to find out data associated with the users session.

User with 7 day cookie set goes to log on. Cookie recovered, session checked against session database to verify user. User_id recovered from session and stored in LoggedOn_uder_id , then forgotten when jala_AdminCore.htm is sent to the browser and that perl program terminates so it can no longer to be accessed in update_tables.cgi to access other data from database which uses the id as key unless update_tables.cgi checks its cookies and loads the proper session object to get the user id from it

Recovering the id from session in the other modules would just be redundant

No it isnt redundant, since that is the only place the new perl instance can access the stored user level data.

Have you considered calling manageusers::ProcessLogonRequest($query) in update_tables.cgi? That would then process the cookie, lookup the session and set the userid. all you have shown us is that you call manageusers::OpenConnection() and that doesnt do anything with cookies or sessions


In reply to Re^28: global var by huck
in thread global var by tultalk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.