Allow or Disallow execution of script

by "Valerie L. Criswell" <valerie(at)suresource.net>

 Date:  Sun, 26 Aug 2001 23:28:39 -0400
 To:  <hwg-languages(at)hwg.org>
 References:  com
  todo: View Thread, Original
I'm in desperate need of some help.  I do ColdFusion, but not PERL.

Here's the deal...

I need my users to agree to a statement before they can execute a script.
The site is in CF, but the script is CGI.  I must use the CGI, and cannot
rewrite the funtionality in CF.

I can send either a URL variable with a query string attached, or I can send
a hidden field in a form to the CGI script either giving it permission to go
ahead and run or send the user back to the main page.

I also cannot allow a user to type the URL of the CGI directly in the
browser and run the script without having first gone to the statement
agreement page.

Sadly, my lines of code don't seem to work at all.

Currently I'm sending a hidden field of the name "iagree" with the value of
either "yes" or "no" depending on which submit they select.

Please find below the lines that I wrote for the CGI to receive and process
the info.  Anyone who could make it work for me would be GREATLY
appreciated.

if ($fields{'iagree'} eq "no")
     { print <<Go_to_front_door;
Content-type: text/html;
<meta http-equiv="refresh"
content="0;URL=http://www.mydomain.com/thepage.cfm">
Go_to_front_door
exit; }

~Val

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA