Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formmail.cgi problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I cannot get my Flash-movie to send anything using formmail.cgi!

The first question:
with the loadVariables-function: How does the cgi-script know which variables to send??

I have put the .swf on a server which has the formmail.cgi, and this is the code in the "submit" button:

on (release) {
if (namn == "ted") { // just for testing
totalcost = 12345; // testing
recipient = "waggerdagger@hotmail.com";
subject = "Testing";
loadVariables ("/cgi-bin/formmail.cgi", "2", "POST");
} else {
gotoAndStop (5);
}
}

The "2" is, as I see it, the depth of that movieclip.

Any suggestions?
 
But loadVariables is designed to read a variable string into the movie. I don't quite see how you hope to make this work?
 
Hmm, don't think you are right there...

/** from Flash Help */
variables An optional argument specifying a method for sending variables. If there are no variables, omit this argument; otherwise, specify whether to load variables using a GET or POST method. GET appends the variables to the end of the URL and is used for small numbers of variables. POST sends the variables in a separate HTTP header and is used for long strings of variables.
/** end of Flash Help */

Furthermore, I have a tutorial that uses loadVariables for sending info in a form to a e-mail...
 
Hmmm, I think you're right - sorry, I'm new to this.
;-)
 
The variables sent are those present in the current timeline, this is important when you have generic buttons within their own clips - if those variables are not also present. By the looks though, yours are in the right place.

For testing purposes maybe use getURL(), so you can see the response form the cgi script, and see which variables are getting sent - right now any errors are being sent back to the movie. And also you could use GET.
 
I talked to a guy that knows Flash too, and tried the getURL(). The only thing that happens is I get redirected to the cgi-script.

Still haven't solved the problem...
 
Anyway to have acces to your formmail.cgi?
Can you zip it up and post a link to it?
mywink.gif
ldnewbie
Hope that this
was helpful!
 
Here is info about formmail.cgi :

I have tried a script called "formhandler.pl" and when I used that script, it worked! Don't ask me why.

I have no idea why the others wont work, but this one did.

The problem is I can't find a good copy of i anywhere?

Anyone has it?
 
The script is called formhandler.pl (from
...And...

#########################################
FormHandler
Version 2.0 ## Written by Matthew Wright mattw@worldwidemart.com
## Created 05/31/96 Last Modified 3/6/97 ##
## Copyright 1997 Craig Patchett & Matthew Wright. All Rights Reserved. ## This program is
part of The CGI/Perl Cookbook from John Wiley & Sons. ## License to use this program or
install it on a server (in original or ## modified form) is granted only to those who have
purchased a copy of The ## CGI/Perl Cookbook. (This notice must remain as part of the source
code.) ##
############################################################

Good deal on Amazon.com for that book!
mywink.gif
ldnewbie
Hope that this
was helpful!
 
Well, I sort of got that formhandler.pl too, but I think I'm missing some files or something. Anyway, that doesn't work.

BUt it MUSt work with formmail.cgi - so I need help with it!
I have tried

loadvariables (" "0", "POST");
and changed tried with 1 and 2 also (instead of the "0").
I have tried getURL (" "0", "POST");
and also 1, 2 and "_self" instead of the "0".

Nothing works. It's like it's not responding.
In frame 1 the variables recipient and subject is set.
Then, in frame 2 all forms are located and the submit button.

Now that layot works with the other formhandler.pl that I tried, but not with my own.

Need help...
 
Have you taken it back a notch? Does the Formmail CGI have permission to execute?

BTW: getURL() should work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top