Forum Moderators: open

Message Too Old, No Replies

On Line Email Form

need help with script and tutorial to set up

         

BradK

8:17 pm on Aug 26, 2004 (gmt 0)

10+ Year Member



I need help with a script & how to set it up.
I use Dreamweaver if thats important.

I would like to re-clarify:
I have created the form and a submit button.
I am comfortable with the html document, but I have
no experience with scripts or how they should be set up and linked to my document or form.

Here’s what my host said about putting a form on their server.
“i assume you mean an html form, and that would be used in conjuntion
with something such as cgi or php. we do not provide that service.
Tim (7:54 PM) :
however you can certainly put these on your website, you just have
to write them yourself or have someone do it for you.

I have been looking for a script, but I read about positives and negatives.
So, I’m not clear about what script would be best for this form. Can anyone help?

In looking at the document, I’m guessing about what to do. (using Dreamweaver as editor)
1. I should create a folder and name it “cgi-bin”
2. In that folder, have a txt document named? (don,t know what to name it)
3. Put the script on that txt document.
4. Those should be uploaded into my root folder

Now linking…
5. After I highlight the form on the document, the property inspector is visible.
6. What goes in the “form name field”
7. What goes in the “action field”
8. Should the Method remain “post”

Please advise what’s right and wrong with the above.
If I can understand this part, I may be able to complete
this task.

Thank you very much,

Brad

Bernard Marx

1:04 am on Aug 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1. I should create a folder and name it “cgi-bin”
// "cgi_bin" may be safer.
2. In that folder, have a txt document named? (don,t know what to name it)
// anything you like. Maybe give it the extension .cgi
// all depending on what kind of server script it is
6. What goes in the “form name field”
// well, that depends on what your script wants
// - do you have one yet?
7. What goes in the “action field”
// the url of the script
8. Should the Method remain “post”
// post: info is sent 'invisibly'
// get: info is added to the url as a search string (like Google)
// ..so may depend upon script's requirements
[ any or all of the above may be wrong ]

For the most part, you're in the wrong place if you are thinking of PHP, Perl, probably ASP too. This is Javascript. It's all script, I know, but...

Good luck.

BradK

3:57 pm on Aug 27, 2004 (gmt 0)

10+ Year Member



Thank you Bernard for your
response.

Your help is appreciated,
Brad

StupidScript

6:00 pm on Aug 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just a quickie...

Bernard has you headed in the right direction. Here are a couple of concepts that might help, too:

The CGI directory is normal on your hard drive (you store text files and binary files in there) but it is special on your web server. You need to be able to make (1) that directory a "script" or "executable" directory, and (2) you need to be able to specify "permissions" on the files inside it.

The script you end up using will probably be a PERL script, so your text file can have either the .pl or the .cgi extension ... but it must have an extension recognized by your web server's configuration. Ask your host what extensions you can use and how to set up your cgi-bin (or cgi_bin) folder for executing scripts.

In your Dreamweaver scenario, you can name the form pretty much anything, but stay away from weird characters and spaces. You might need to remember the form name so you can use it in your script.

The "action" refers to "where do you want the form's output to go?". In your case, the "action" will be the location and name of the script you put in your CGI directory. (i.e. /cgi_bin/formparse.cgi) Inquire with your host about what path to use for your CGI directory, after you have it all set up.

Indeed, read up on CGI directories and form processing. You will find very little about Javascript in those documents. :)

Bernard Marx

8:37 am on Aug 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1. I should create a folder and name it “cgi-bin”
me: "cgi_bin" may be safer.

Rubbish. I don't know what I have against hyphens. Mine is called "cgi-bin".

StupidScript actually knows what he's talking about, so I'd listen to him.

BradK

4:45 pm on Aug 30, 2004 (gmt 0)

10+ Year Member



StupidScript & Bernard
Thank you both, I'll keep
trying,

Brad