Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Cgi-script

How to use session in CGI scripting?
In ASP we can embed ASP code in HTML tags. How the same thing can be achieved in CGI?
In ASP, there is facility of redirecting from one file to other. How this can be done in CGI? Is there
any inbuild Object.

Any suggestions plzzzzz
0
saritalodhi
Asked:
saritalodhi
1 Solution
 
mnashadkaCommented:
The big question is - what language are you doing your CGI in?  Using cookies is very common (with the Set-Cookie header to set it and checking HTTP_COOKIE to retrieve it).  Different languages and web servers use sessions differently, so I don't know how to answer that question.
0
 
bebonhamCommented:
typically you write hidden tags to embed your variables in the html page.

as mnashadka says about headers, they will also be useful for your redirects.

Bob
0
 
andreifCommented:
Embedded Perl (embperl) allows to insert Perl code into HTML page.

What kind of redirect you need? Do you want redirect client's browser or just caal another script?

For sessions you can use Apache::Session module
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
kirthirCommented:
There are 3 different methods of maintaining session using CGI
1)environment variables
2)hidden fields
3)storing in a file
4)cookies

Let me know if you want more information on any of the above mentioned topics

0
 
kirthirCommented:
Redirecting from one file to other, i think u can think of "server side includes"

Server side includes are directives which we can place into html documents to execute other programs or output such data as environment variables and file statistics.

Let me know if you want any further information on this.

0
 
maneshrCommented:
saritalodhi,

Did you get the solution you were looking for?

                     What solution, if any, did you use?

                     If you have already found a solution, please go ahead and close this question.

                     Thanks,
0
 
maneshrCommented:
saritalodhi,

Did you get the solution you were looking for?

What solution, if any, did you use?

If you have already found a solution, please go ahead and close this question.

Thanks,
0
 
MoondancerCommented:
Finalized, no response to follow up requests, assume resolved with this help given.
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now