Help!! How to Pass Variables to my cgi...

Help!! How to Pass Variables to my cgi...

Post by Kurt J. Lanz » Wed, 07 Apr 1999 04:00:00




> Hi,  Can anyone tell me how to pass variables to my cgi script without using
> a post or get method?  I have a cgi that lists the contents of a directory
> and I want to use this same cgi for all directories.  I would like to just
> pass the directory variable from the webpage to the cgi script.  Can anyone
> tell me how to do this?  Any examples would be helpful... Thanks in
> advance...

Pardon? "I would like to learn something without either reading about
it or hearing someone talk about it." You must do one or the other.
I suspect you nead an introduction to how the web works. A bookstore
is a good place to start.
 
 
 

Help!! How to Pass Variables to my cgi...

Post by Steve Dic » Thu, 08 Apr 1999 04:00:00




Quote:> Hi,  Can anyone tell me how to pass variables to my cgi script without using
> a post or get method?  I have a cgi that lists the contents of a directory
> and I want to use this same cgi for all directories.  I would like to just
> pass the directory variable from the webpage to the cgi script.  Can anyone
> tell me how to do this?  Any examples would be helpful... Thanks in
> advance...

What you want is simply:

...../cgi-bin/dirlist.cgi?/this/is/the/directory/path/to/be/listed

Be aware that such a script *could* be a security risk - you might want to limit it
to just the (relative) directories under your web pages.

--
Steve*s - Starswan Systems Ltd
Hertfordshire's premier one-man Systems Consultancy

 
 
 

Help!! How to Pass Variables to my cgi...

Post by Kurt J. Lanz » Thu, 08 Apr 1999 04:00:00





> > Hi,  Can anyone tell me how to pass variables to my cgi script without using
> > a post or get method?  I have a cgi that lists the contents of a directory
> > and I want to use this same cgi for all directories.  I would like to just
> > pass the directory variable from the webpage to the cgi script.  Can anyone
> > tell me how to do this?  Any examples would be helpful... Thanks in
> > advance...

> What you want is simply:

> ...../cgi-bin/dirlist.cgi?/this/is/the/directory/path/to/be/listed

> Be aware that such a script *could* be a security risk - you might want to limit it
> to just the (relative) directories under your web pages.

Also remember that such a URL will cause the browser to use the GET
method. Which the original poster did not want to use. Probably because
he didn't realize what he was asking. And if that is the case, he will
next be asking how he uses that information, so we will have to teach
him about QUERY_STRING, when he should be reading a few manuals here
and there. Sigh........
 
 
 

Help!! How to Pass Variables to my cgi...

Post by Miguel Cr » Thu, 08 Apr 1999 04:00:00



> What you want is simply:

> ...../cgi-bin/dirlist.cgi?/this/is/the/directory/path/to/be/listed

How about: /cgi-bin/dirlist.cgi/this/is/etc plus a judicious inspection of
environment variables? Who needs question marks? http://u.nu is all scripts
and parameters but not a question mark to be seen.

miguel

 
 
 

1. Netscape-Server CGI variable REMOTE_USER isn't being passed

This is in reference to a problem using the UNIX version of the Netscape
Enterprise Server.

Normally, when one uses .htaccess to set restrictions on http access,
there is a variable called "REMOTE_USER" which is passed so that the
server, and any cgi scripts, can know who the requests are coming from.

I seem to be getting a variation on this: the server doesn't have to
prompt for password information more than once, which means it can
recognize the browser session, but the variable REMOTE_USER, nor any sort
of session-unique variable is being passed so that a cgi script can use
that information.

Can anyone help?

2. Find Manual for IBM 7137-414

3. Hey server gurus... passing environment variables to CGI programs?

4. htaccess

5. Passing variables to a CGI script in SSI

6. Would you use Inernet Explorer 3.0/4.0 if it was ported to Linux?

7. ?:pass new ENV variables to CGI scripts

8. X Resources pixmap path

9. Passing non-standard environment variables to CGI scripts

10. CGI passing Enviroment-Variables

11. ORACLE/CGI - can a CGI script inherit preset ORACLE unix env variables?

12. HELP: How to pass cgi-bin request to another server.

13. need help passing date to variable