Results 1 to 3 of 3

Thread: Okay im TOTALLY new to cgi, please help.

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    43

    Post

    Right this is probably the easiest thing to do, but im a total newbie to perl/cgi and i know absolutly nothing about it.
    Okay i want to know how you call cgi scripts from html pages, or dont you do this. Basically i have a mail script that i want to be activated when someone logs onto the page, can some one please help?
    btw i was thinking along the lines of <script></script> is this wrong???
    Thanx
    Cease
    Cease

    This post has been brought to you with the help of:

  2. #2
    Guest
    Well,
    you can use <script></script>
    but that is for PerlScript

    Code:
    <script language="perlscript">
    #do crap here
    </script>
    a "real" way to have a perl page is something like this

    Code:
    #!usr\bin\perl #physical path to perl
    
    #do some crap here
    All perl pages start with #!path-to-perl, which is the path to perl on your server..
    not the virtual path, but the physical path, like you would do on your computer.

    # donates a comment BTW.. one of the only exceptions is with #!user\bin\perl....

  3. #3
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Depends on what kind of thing you want to do. If you want to write some PerlScript functions that are used when you click buttons, on loading the window, that kind of thing, then you use this format:

    <SCRIPT LANGUAGE="PerlScript">
    #your code, as Dennis said, goes here
    </SCRIPT>

    If you want to use a function library file, calling functions from it, you use:

    <SCRIPT LANGUAGE="PerlScript" SRC="filename"></SCRIPT>

    Or, if you want to compile a CGI executable that delievers a page of HTML (and possibly scripts) as its output, then I'm not quite sure but I think you set up a directory to be executable (usually called cgi-bin) and use the filename of your CGI executable as your page name.

    To me it looks like you want option 1 or 2.
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width