Starting a cgi process

Jan Schenkel janschenkel at yahoo.com
Mon Dec 10 15:25:09 EST 2007


--- Richard Miller <wow at together.net> wrote:
> I assume there's a simple way to do the following,
> but I can't find  
> it in the documentation.
> 
> I understand how to use a form to pass data to, and
> start, a Rev cgi  
> process, for example:
> 
> <form
> action="http://myserver/cgi-bin/DoRevRoutine.cgi"
> method="get">
> .... form data goes in here, which is received in
> the Rev script  
> through $QUERY_STRING
> <input type="submit" value="search">
> </form>
> 
> How do I pass data to, and start, a Rev cgi process
> using just a  
> hyperlink?
> 
> I'm guessing I can use this type of html syntax:
> <a href=http://myserver/cgi-bin/DoRevRoutine.cgi....
> with something coming after ".cgi" which can pass
> data to the Rev cgi  
> script.
> 
> What's the syntax for creating the hyperlink and
> then receiving and  
> parsing the data in the script?
> 
> Thanks.
> Richard Miller
> 

Hi Richard,

For CGI scripts that are called using the HTTP GET
method, you'll take the URL and append a question mark
and a URL-encoded version of the parameters, where the
parameters are in key-value pairs with an equal sign
between the key and the value, and multiple parameters
separated by ampersands.

Example:
<http://www.example.com/cgi-bin/myscript.cgi?param1=value1&param2=value2>
Your CGI script will then get the $QUERY_STRING:
"param1=value1&param2=value2"

If your CGI script uses the POST method, you can use
the libUrlFormData function - see the Revolution
dictionary for detailed information.

Hope this helped,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the use-livecode mailing list