PDA

View Full Version : Frommail CGI


Huw
12-05-2002, 10:24 AM
Hi,

I have followed the tutorial on converting HTML forms to flash but I can't seem to get mine to work.

I am sending the imformation to a cgi script on a different server to the one the site is being hosted on although this shouldn't make any difference, as I am using the whole URL e.g

(on (release) {
loadVariablesNum ("http://vweb2.hiway.co.uk/cgi-bin/genmail.pl", 0, "POST");
}

I think the problem might be with my hidden field, I am having trouble asigning the script to the field.

My CGI is looking for the RECIPIENT in the hidden filed, so I have created a text field on the stage with the variable RECIPENT assigned to the button. My problem comes when I try asigning the following script.

RECIEPIENT = "myemailaddress.co.uk";

Where and how do I asign this script, giving the field a value? The only place I can asign it to is a frame, I can't attach it to the text field.

How do you make the field hidden, Do you literally hide it under another graphic or am I missing something here??

simontheak
12-05-2002, 01:23 PM
There are no such things as hidden fields in Flash. The equivalent to them is just a plain ordinary variable.

So any fields that would be hidden in an HTML form you need to declare in the first frame of your time line.

For example:

recipient="you@yourdomain.co.uk";
thanks="http://www.yourdomain.co.uk/thanks.html"

//etc ...

When the button is pushed, these variables will be sent along with all the other variables which have been populated with text entered by your user.

One other thing - I'm not sure about this, but I'm not sure that CGI scripts will send out information to a different domain name as a safety precaution. I might be wrong, but you may need to have the CGI script on the same domain as your website.