Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Multiple Pages with CGI

by Trihedralguy (Pilgrim)
on Mar 24, 2007 at 14:45 UTC ( #606416=note: print w/replies, xml ) Need Help??

in reply to Multiple Pages with CGI

How do i send stored varibles from one page to another without using cookies / putting them into the url bar like index.cgi?=yourssn=2222222222

Replies are listed 'Best First'.
Re^2: Multiple Pages with CGI
by GrandFather (Sage) on Mar 24, 2007 at 20:23 UTC

    CGI::Session or a database are the conventional ways of storing information pertaining to a session or a user. Using a cookie (which CGI::Session manages for you) or some get data embodied in the URL is generally the way you track a session.

    The trick is to use a key (in the URL) that provides access to the server side stored information for the session. Often an MD5 hash of something like a user ID and login time is used to provide the key.

    DWIM is Perl's answer to Gödel
Re^2: Multiple Pages with CGI
by sgifford (Prior) on Mar 24, 2007 at 16:00 UTC
    The only ways to get information to your script from a client are cookies, forms, and the URL. You can use cookies to create sessions, where you store the information on the Web server and just pass enough information to find the session data. You can use forms with hidden elements to pass information to your script that is not entered by the user. Forms which use the GET method will have the parameters show up in the URL; with the POST method the parameters will not be visible in the URL.

    From your example, it looks like the user may be entering private information you don't want to show up in the URL. In that case, a good solution is to have the user enter the information into a form which uses the POST method, and make sure the server is using SSL so the data is encrypted, and so the browser is more careful with the information in its history.

    Hopefully that will be enough to get you started.

      Can you please explain the method in which user enters the information into a form...thanks !!
        Data from the form can come from user input from the various HTML input elements (textboxes, buttons, dropdowns, radio buttons, etc), or from data embedded in the HTML document by the server using hidden form elements, like this:
        <form> <input type="hidden" name="var1" value="val1"> <input type="hidden" name="var2" value="val2"> <!-- ... --> </form>
Re^2: Multiple Pages with CGI
by ultibuzz (Monk) on Mar 26, 2007 at 08:04 UTC

    if u want to transport data to several pages u can use input hidden fields, so u don't need to mess up ure url or store everything in cookies

    kd ultibuzz

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://606416]
and the questions are moot...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2018-04-25 21:04 GMT
Find Nodes?
    Voting Booth?