padone
06-02-2005, 05:04 PM
Hey guys
I had this php code to send emails when its called from flash and worked sweet untill today just wondered if someone with a bit more php background
could take a look at it and let me know if its broke
<?php
$content="
Hi
$theirname\n
You have been challenged by\n
$yourname\n
to beat their score at : http://www.mydomain.co.uk/index.htm\n
$yourname
Total lap time was\n
$totalrace\n
See if you can do better\n";
mail($theiremail, "Challenge from $yourname", $content, "From: $youremail");
$filename = "answer.txt";
$fd = fopen( $filename, "r" );
$contents = fread( $fd, filesize( $filename ) );
fclose( $fd );
mail( "$youremail", "Formula 1", "$content", "From:craig@mydomain.com\n" );
$signal=1;
echo "signal=$signal";
?>
and the actionscript to call the php page is
on (release) {
if (signal != 1 && youremail .indexOf("@") != -1 && youremail .indexOf(".") != -1 && theiremail .indexOf("@") != -1 && theiremail .indexOf(".") != -1 && yourname != "" && theirname !="") {
signal=2;
loadVariablesNum ("tellfriend.php", 0, "POST");
_root.clip._visible = 1;
_root.click = 1;
}
if ( youremail .indexOf("@") ==-1 || youremail .indexOf(".") ==-1) {
x2._visible = 1;
}else{
x2._visible = 0;
}
if ( theiremail .indexOf("@") ==-1 || theiremail .indexOf(".") ==-1) {
x3._visible = 1;
}else{
x3._visible = 0;
}
if ( yourname == "" ) {
x1._visible = 1;
}else{
x1._visible = 0;
}
if ( theirname == "" ) {
x4._visible = 1;
}else{
x4._visible = 0;
}
}
The thing is my flash seems to be working becasue when i click send it actually goes to the next stage and says that it sent but no emails come through :confused: :confused:
I had this php code to send emails when its called from flash and worked sweet untill today just wondered if someone with a bit more php background
could take a look at it and let me know if its broke
<?php
$content="
Hi
$theirname\n
You have been challenged by\n
$yourname\n
to beat their score at : http://www.mydomain.co.uk/index.htm\n
$yourname
Total lap time was\n
$totalrace\n
See if you can do better\n";
mail($theiremail, "Challenge from $yourname", $content, "From: $youremail");
$filename = "answer.txt";
$fd = fopen( $filename, "r" );
$contents = fread( $fd, filesize( $filename ) );
fclose( $fd );
mail( "$youremail", "Formula 1", "$content", "From:craig@mydomain.com\n" );
$signal=1;
echo "signal=$signal";
?>
and the actionscript to call the php page is
on (release) {
if (signal != 1 && youremail .indexOf("@") != -1 && youremail .indexOf(".") != -1 && theiremail .indexOf("@") != -1 && theiremail .indexOf(".") != -1 && yourname != "" && theirname !="") {
signal=2;
loadVariablesNum ("tellfriend.php", 0, "POST");
_root.clip._visible = 1;
_root.click = 1;
}
if ( youremail .indexOf("@") ==-1 || youremail .indexOf(".") ==-1) {
x2._visible = 1;
}else{
x2._visible = 0;
}
if ( theiremail .indexOf("@") ==-1 || theiremail .indexOf(".") ==-1) {
x3._visible = 1;
}else{
x3._visible = 0;
}
if ( yourname == "" ) {
x1._visible = 1;
}else{
x1._visible = 0;
}
if ( theirname == "" ) {
x4._visible = 1;
}else{
x4._visible = 0;
}
}
The thing is my flash seems to be working becasue when i click send it actually goes to the next stage and says that it sent but no emails come through :confused: :confused: