Forum Moderators: phranque

Message Too Old, No Replies

CGI script nightmare!

         

tidydougal

11:15 am on Dec 11, 2003 (gmt 0)

10+ Year Member



could some body explain to me IN ENGLISH! how to connect a cgi script to a dreamweaver form and how to get it workin, because its driving me nuts as im in a bit of a rut with it at the moment?

gbaker123

11:50 am on Dec 11, 2003 (gmt 0)

10+ Year Member



If you can sticky me with the specific details, I'd love to. Basically all you should have to do is put it in the action tag of your form, in a link or an Include statement.

George

ddesign

2:17 am on Dec 16, 2003 (gmt 0)

10+ Year Member



Tidydougal,

Did you ever find out how to do this? This problem is the reason I logged on to WW tonight. I know this is simple, but I MUST be doing something wrong as I can NOT get my mailto form to work! Please sticky or post if you got help with it? Thank you!

Avitar

5:52 am on Dec 31, 2003 (gmt 0)

10+ Year Member



Well you just call up your dreamweaver file like normal, and in the form tag put:

<FORM ACTION="http://www.domain.com/cgi-bin/scriptname.cgi" METHOD="POST">

Any variables you wish to pass that will be inputed by the user on that page should be HTML elements that have a valid NAME property. Additionally or alternativly you can hardcode variables in the Action line ie.

ACTION="http://www.domain.com/cgi-bin/scriptname.cgi?var1=dog&var2=cat&var=butter&var4=David%20Smith"

Note:
- format for varibles is variablename=value
- the seperator for the first variable is a? sign
- the seperator other variables is a & sign
- Spaces are represented by %20 (sometime the + sign on some systems)
- Non-alpha-numeric characters like!@#$%^&*()_+=,./<>?[ have special representations like the space character

In addition you can use METHOD="GET" which is more freindly but less secure (helps DEBUG).

This site may help
[ist.uwaterloo.ca...]

it might help to learn a bit of perl/cgi as well

Good Luck

-----
David Smith

[edited by: DaveAtIFG at 5:57 am (utc) on Dec. 31, 2003]
[edit reason] Trimmed sig [/edit]