in reply to Re: Perl and HTML
in thread Perl and HTML

Can you not just create an overall script that gets passed some information on whether the cookies have been found or not. That way you can just include a simple statement that checks to see if the value is true or false then executes a given script based on the answer, say:
my ($boolean) = @_; if($boolean eq 1) { #call script here } else { #call HTML page here }

Hopefully this way you will be able to troubleshoot alot easier when you get a probelm with your code, where you can find the problem a much quicker - you know which script is causing the problem.

MonkPaul.

Replies are listed 'Best First'.
Re^2: Perl and HTML
by bigjoe11a (Novice) on Jul 06, 2005 at 19:37 UTC
    Ok, sorry, no one has the right idea. I don't want to call a html page from a cgi script. I want to call a cgi script from a HTML page. It's a short script. it does 2 things. when the user views my index.html page. the cgi script runs. It checks for to cookies. if it finds them, it says welcome back user. if it doesn't it then displays a form, so if they wanted to. they couls sign. or some thing lime that.

      Do yourself a big favor and read this: Ovid's CGI Course. It will help you understand how to work with CGI and HTML. If you want some example code that uses cookies, try these two nodes: 273481 and 273652. Just copy the code verbatim into a CGI script that can be executed by the web server. If that didn't make sense, then you need to read that first link. It will help.

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
        I already know how to use,set, and read in cookies. I just asked a simple question, why can't I get a simple answer. HOW do I run an cgi script from an HTML page.