Solved

Cgi-script

Posted on 2001-08-29
8
245 Views
Last Modified: 2013-12-25
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
Comment
Question by:saritalodhi
8 Comments
 
LVL 8

Expert Comment

by:mnashadka
Comment Utility
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
 
LVL 8

Expert Comment

by:bebonham
Comment Utility
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
 
LVL 6

Expert Comment

by:andreif
Comment Utility
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
 
LVL 1

Expert Comment

by:kirthir
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:kirthir
Comment Utility
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
 
LVL 16

Expert Comment

by:maneshr
Comment Utility
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
 
LVL 16

Accepted Solution

by:
maneshr earned 40 total points
Comment Utility
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
 
LVL 1

Expert Comment

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now