Click to See Complete Forum and Search --> : I'm Baffled...


RandomUser
01-11-2004, 12:21 AM
I really hope to take advantage of CGI and use it in connection with my website in order to liven it up, but by the way things are currently going it doesn't seem like that will happen...

I just can't get it into my head how the heck you go about setting up a basic CGI script and make it active on your webpage. I own a book about CGI and the HTML/XHTML books i own all have at least one chapter devoted to CGI but even with all this information, i still can't get a clear picture of how it actually works. Ok, ok, perhaps i should read my books more, but as i skim through, i become even more lost. I know that my host allows for CGI activity... And that's it. What i do next i have no idea. I have pondered the HTML Goodies CGI tutorials but i get stuck when the word "telnet" is used.:confused: I've heard that the personal creation of CGI type scripts is dependant on what Internet Service Provider you use. WFT? I use NTL...:rolleyes:, heh. I am totally lost.

Here's what i guess you do when setting up a CGI script (don't laugh):

1. Create a script using a language designed for CGI (Perl or something)... Or just copy a popular script and use that. Ok, just pretend we've made a script that will make data from an HTML form be sent to a particular e-mail adress when the user clicks "send".

2. Save the script as .whatever (.pl, .sh or .exe)

3. Log in through FTP and place the script in your cgi-bin.

4. Create an HTML document designed to work with the CGI script [The HTML form be sent to a particular e-mail adress when the user clicks "send"] and link the CGI script to the appropriate part of the HTML code...

That's it. That's my screwed up way of thinking how CGI scripts work. I've had a quick look at previous threads in the CGI forum and almost everyone seems to know what they're doing (well to a certain extend)... Nearly everyone can get past the first hurdle of CGI. I can't. Hopefully a generous forum member will provide me with a bit more BASIC knowledge of this "baffling" area of the world of web design...

Thank you for taking the time to read this post.

Jeff Mott
01-11-2004, 12:55 AM
That's it. That's my screwed up way of thinking how CGI scripts work.That's actually quite correct. It is possible, however, that there is some minute detail that was missed along the way. If you post the HTML document and CGI script you're working with then we may be able to help you find the problem.

RandomUser
02-26-2004, 07:05 PM
Originally posted by Jeff Mott
That's actually quite correct. It is possible, however, that there is some minute detail that was missed along the way. If you post the HTML document and CGI script you're working with then we may be able to help you find the problem.
Ok, appologies for the delayed reply. Here's what i have done, I downloaded "ActivePerl-5.6.1.635-MSWin32-x86" which i guess is a Perl Interprenter or something. I don't even know what it does, but apparently you need it hehe. Then i wrote a basic piece of CGI coding using NotePad and linked it to the Interprenter (#c-perl-bin etc...) and then saved it and FTP'd the script to my CGI-BIN.

Here is the result: http://www.bio-edge.co.uk/cgi-bin/test.pl

Oh and one more thing, the guide i currently use to help me with CGI uses an Apache Server or something like that to test CGI scripts. I hvae no idea what Apache is/does and i am curious to know if you need this program in order to properly write/execute CGI scripts within your webpages.

Once Again, Thank You For Reading.

Super Sonic
02-26-2004, 07:24 PM
I'm Fourteen and haven't been at this for long. I just barely made my first site counter. You seriously aren't as lost as you think. My first script was the hardest. (HELLO WORLD!?! Easy my butt!)

Activeperl is an interpreter. It reads the program and tells the computer what to do with it.

My book tells me about APACHE TOO! A huge complicated section about all this Apache stuff. I took one glance and decided SCREW THAT!

I publish with Frontpage. That is quick and very convenient. I'm getting along just fine without Apache.

Now that you made your hello world type deal script, (If you haven't already), I'd try to make the "it worked" after submitting a form. That was my next step. If I can help you in any way just ask.