I use Flash CS3 but actionscript 2.0
Hello everybody, I want to make a emailer where u can email me from a flash movie. or I may make a emailer which you tell your friends about a game to unlock stuff.
anyway I click the on the PHP file and run it once its uploaded... yes it works.
i use this:
Yep, as I said it works. where the to and from stuff is, is where flash comes in.PHP Code:<?php
$to = "[email protected]";
$subject = "Hello";
$message = "Hope this will work with flash!";
$from = "Julian Mchutchison <[email protected]>";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Hi everybody";
?>
in flash I use this script:
then the PHP script i use for that is...Code:php = new LoadVars(); pressy.button.onPress = function(){ pressy.gotoAndStop("sending"); php.sendAndLoad("trythi.php",php,"POST"); name = ""; emailfrom = ""; emailto = ""; othername = ""; mes = ""; } php = new LoadVars(); pressy.button.onPress = function(){ pressy.gotoAndStop("sending"); php.sendAndLoad("trythi.php",php,"POST"); name = ""; emailfrom = ""; emailto = ""; othername = ""; mes = ""; }
hmm.... it doesn't work.PHP Code:<?php
$to = $_REQUEST[emailto];
$subject = $_REQUEST[othername];
$message = $_REQUEST[mes];
mail($to,$subject,$message);
echo "You win!";
?>
It may possibly be because of an INI file i have called php.ini
it contains:
and it seems to make stuff work.Code:SMTP = localhost smtp_port = 25
do i need to load the ini file too to get flash to send something?
or do I just need to use GET instead of POST?
i am still mucking around right now but If i don't sort it out hopefully somebody else will.
thank you, this will help me alot because I have heaps of Ideas to do with this subject, and it will get me more familiar to PHP.





Reply With Quote