Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^4: tracking session:variables

by rjsaulakh (Beadle)
on Jun 01, 2005 at 13:09 UTC ( #462420=note: print w/replies, xml ) Need Help??

in reply to Re^3: tracking session:variables
in thread tracking session:variables

hope i am not annoying you

i want to have a perl program using which i can manage session variables of the user who login through an shtml page . i want to execute this perl program after the authentication is done so that i can store the session variables

i dont want any page display as in cgi

Replies are listed 'Best First'.
Re^5: tracking session:variables
by castaway (Parson) on Jun 01, 2005 at 13:24 UTC
    You mean a page in shtml (whatever that is), has a form, which when filled out posts the data to your perl program? What does the "authentication" then? You can store the variables that way, but you can't retrieve them, only perl can retrieve them, so only perl can produce a page using your variables.

    It's not easy to just add a CGI script to an existing set of HTML pages, just because you decide you need it. You need to redesign. It would be a lot easier if you created your pages with the perl CGI program too.

    Update: Of course, to read the cookie later, after it is set, the CGI will also need to be one that can access the HTTP headers directly. In short, you cannot run CGI scripts like that, so please rethink your program/site.


Re^5: tracking session:variables
by Joost (Canon) on Jun 01, 2005 at 13:22 UTC

      i am very sorry to both castaway and you i think i am not able to exxplain myself properly . from now on i will try to reprsent my views in such a way that i can get quick and related answer which will save time for both of us sorry i hope not to repeat it again

      1. can i call a cgi program from within another cgi program
      2. what are the things i have to take care of

        You can call a CGI program from within another CGI program (take a look at do), but you usually don't want to - since normal CGI programs set up a response and parse input so you have to be really careful to not entangle the output and you'd be parsing the input twice for no good reason.

        IMO, if you're going this route, you'd be much better off using CGI::Application combined with CGI::Application::Session. That'll do 3 things: it'll set up a session automatically, and it'll help you do multiple actions in a single script in a reasonably consistent and easy to follow manner, and it'll make it very easy to use templates.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://462420]
marioroy At a large firm, had to awaken a security guy a few times so that nobody would catch him sleeping.
marioroy On a large dairy farm, almost went off the road with a 10 wheeler from exhaustion. On the farm, almost went off the silo with a big tractor. At the Fransiscan monastery, almost slipped off the dome while painting it.
[marioroy]: In Saudi Arabia caught fire but didn't burn. I think angels exist.
Lady_Aleena clean up after dinner finally.
[Discipulus]: uch! so we are twice lucky to have MCE..;=)
[marioroy]: Working a midnight graveyard shift, on the way home ran out of gas. just 2 minutes later somebody stops with a small tank of gas. It's wierd. There's always someone nearby for some reason.
[Lady_Aleena]: I was the one who stop[ed in the middle of a cold night to pick up a small family walking to a gas station. I got a few gallons of free gas for the round trip, and the grandmother said she'd pray for me.
[marioroy]: Folks do not know it, but MCE was ridiculously difficult. At Niagra Falls, heard a voice on enabling Grace while in the mist boat. That 10x performance is possible.
[marioroy]: Lady_Aleena Angels on earth are real people. That's awesome.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-05-29 08:26 GMT
Find Nodes?
    Voting Booth?