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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Forms 1

Status
Not open for further replies.

flasher

Technical User
Mar 4, 2002
245
US
I don't know the first thing about creating forms in flash. Is it possible to create a form and program it with the equivalent of "form mail" directly in flash? (so that I won't need any outside cgi or form mail scripts...)

If this is possible, (I am not much of a programmer at all...) Is it complicated to do? and where can I find simple to follow instructions on how to do it? Thank you.

(I'm referring to a simple contact form with a script that will collect the data and send it to an email address.)
 
You can launch the user's email application by using
getURL(mailto:theirMail@theirSite); otherwise you'll have to use a server script. These scripts are very easy though (especially within PHP) and can be accessed from Flash with loadVariables() without any difficulty.
 
Anywhere I can find detailed instructions on how to go about doing all that? It may be easy once you know where to start...thanx.
 
Here's a really simple PHP script to try.

<?
$mailMessage = &quot;$senderMessage&quot;;
$mailFrom = &quot;From: $sender&quot;;
$mailTo = &quot;$recipientName&quot;;
$mailSubject = &quot;$senderSubject&quot;;
mail($mailTo, $mailSubject, $mailMessage, $mailFrom);
?>
Save this as &quot;mail.php&quot; on your server.

Set up the variables senderMessage,sender,recipientName and senderSubject in your Flash movie as text input fields and then use:

loadVariables(&quot;mail.php&quot;,&quot;&quot;,&quot;POST&quot;);

To get the values to your PHP page.
 
If you're thinking of putting this up on your free.hosting space, I refered you to yesterday, I don't think it will work, or at least I've never really managed to get it going!

Correct me if I'm wrong Wang... Is it just me? Or is it true that this wouldn't work on that kind of a free server?

Regards,
new.gif
 
Your server does have to have PHP installed which not every ISP supports - you may be lucky though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top