View Full Version : Kirupas php mail form, Please help
xalex1
March 15th, 2004, 12:27 AM
I did everything that said on the tutorial but i doesent send any emails ? What could be wrong ? Any tips of things i have to watch for ?
As soon as i press the send button i tlooks like the mc sends the file to the email.php , and goes to the next frame. But the emails are not getting to me ?
ill apreciate any help ! :)
Inflicted
March 15th, 2004, 05:38 PM
Welcome to the forums!
Did you upload the php file to your server as well?
Putting it All Together
All that remains now is uploading your published swf (with accompanying html) and PHP file to your server. Be sure you keep the PHP file in the same directory as your swf and html or your script may not be found when called from Flash. If you don't want it to be in that same directory, be sure you correctly reference the location of the PHP file in the loadVariables command used in Flash
ScHAmPi
March 15th, 2004, 06:21 PM
You do have php support on your host?
nik
March 16th, 2004, 08:46 PM
yeah i have the same problem ...i uploaded my version first, that didn't work. then i uploaded senocular's files- those didn't work either. what's all my host needs to have ?
i know they have smtp and php. anything else they need to have for me to be able to send emails with php?
ScHAmPi
March 19th, 2004, 08:15 PM
No normally not. Wouldn't know what your prob is :(.
Seticus
March 20th, 2004, 05:45 AM
MM, I think jubs made a mistake, the first parameter should be the adressed, so change fromEmail to toEmail:
mail($toEmail, $Subject, $nMessage."\nFrom: ".$fromName."<".$fromEmail.">");
If that's not it...
Most of the server force you to use getvars to extract data out of an URL, like add (in the php-file)
$fromEmail = $HTTP_GET_VARS["fromEmail"];
$nMessage = $HTTP_GET_VARS["nMessage"];
$fromName = $HTTP_GET_VARS["fromName"];
$fromEmail = $HTTP_GET_VARS["fromEmail"];
nik
March 20th, 2004, 10:38 AM
this is what my send.php looks like:
$phpto=$HTTP_POST_VARS['to'];
$phpfrom=$HTTP_POST_VARS['from'];
$phpsubject=$HTTP_POST_VARS['subject'];
$phpmessage=$HTTP_POST_VARS['message'];
$phpheaders = "From: ".$phpfrom."\n";
mail($phpto, $phpsubject, $phpmessage, $phpheaders);
echo "&result=good";
would that somehow make it different from what seticus said?
is there an actual way to check if the mail function did its thing instead of my dumb echo "&result"?
Seticus
March 20th, 2004, 02:33 PM
how are you calling the file, from flash? What is the code you use...
nik
March 20th, 2004, 02:41 PM
just a very simple LoadVars:
frame:
info=new LoadVars();
info.onLoad=function(success){
if(success){
if(this.result=="good"){
message.text="Your Email has been sent.";
}else{
message.text="Hasn't";
}
}else{
message.text="Server cannot be reached at this time. Please try again later.";
}
}
button that sends it:
on(release){
info.to=to.text;
info.from=from.text;
info.subject=subject.text;
info.message=message.text;
info.sendAndLoad("send.php?rnd="+random(999),info);
}
ps: thanks seticus
Seticus
March 20th, 2004, 03:44 PM
try:info.sendAndLoad("send.php?rnd="+random(999),info,"POST");
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.