Update:
The Ecards are now working with the dBText set to 777 permissions. However, when I set the permissions to 766, the cards are sent, but there is not text written to the cards. The variables are being collected in the .txt document.
Is there an error in my code? I am still receiving the error log in the Ecards directory.
Here is the SendEcard.php code that I'm using:
<?
$CreateEcard = date(U);
$filename = $CreateEcard.".txt";
$ToEmail = $_POST["ToEmail"];
$FromEmail = $_POST["FromEmail"];
$ToName = $_POST["ToName"];
$FromName = $_POST["FromName"];
$Greeting = $_POST["Greeting"];
$IntroMessage = $_POST["IntroMessage"];
$EndMessage = $_POST["EndMessage"];
$EcardSelect = $_POST["EcardSelect"];
$ToName = stripslashes($ToName);
$FromName = stripslashes($FromName);
$Greeting = stripslashes($Greeting);
$IntroMessage = stripslashes($IntroMessage);
$EndMessage = stripslashes($EndMessage);
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
$Created="Ecard Created on $Today";
$EcardNum = $EcardSelect;
$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromName&FromEmail=$FromEmail&Greeting=$Greeting&IntroMessage=$IntroMessage&Created=$Created";
$fp = fopen( "./dBText/$filename","w");
fwrite($fp, $EcardText, 10000);
fclose( $fp );
$ToSubject = "You have received a Pinky and Peanut E-card from $FromName";
$Message = "$ToName,\nYou have received a Pinky and Peanut E-card from $FromName. \nClick the following link to view your E-card:\n\n
http://www.pinkyandpeanut.com/Ecards/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------\nHere is the message that was sent:\n$ToName,\n$Greeting\n$IntroMessage\n\n-$FromName\n\n\n-----------------------------------\nThis E-card was sent from
www.pinkyandpeanut.com.";
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">");
print "_root.Status=Your Pinky and Peanut E-card Has Been Sent!";
#### End #########
## By: Jeffrey F. Hill
##
www.flash-db.com?>
Here is the SelectCard.php code:
<HTML>
<HEAD>
<TITLE>Here's your Pinky and Peanut Ecard!</TITLE>
<?
$ENum = $_GET["ENum"];
$EcardText = $_GET["EcardText"];
switch ($ENum) {
case '1':
$goto = "Ecard1.swf?EcardText=".$EcardText;
$gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=1";
$Dimensions = "WIDTH=550 HEIGHT=450";
$DimensionsFooter = "WIDTH=450 HEIGHT=350";
break;
case '2':
$goto = "Ecard2.swf?EcardText=".$EcardText;
$gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=2";
$Dimensions = "WIDTH=550 HEIGHT=450";
$DimensionsFooter = "WIDTH=450 HEIGHT=350";
break;
case '3':
$goto = "Ecard3.swf?EcardText=".$EcardText;
$gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=3";
$Dimensions = "WIDTH=550 HEIGHT=450";
$DimensionsFooter = "WIDTH=450 HEIGHT=350";
break;
case '4':
$goto = "Ecard4.swf?EcardText=".$EcardText;
$gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=4";
$Dimensions = "WIDTH=550 HEIGHT=450";
$DimensionsFooter = "WIDTH=450 HEIGHT=350";
break;
}
?>
</head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<center>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
<? print "$Dimensions";?>>
<PARAM NAME=movie VALUE="<? print "$goto";?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="<? print "$goto";?>" quality=high bgcolor=#FFFFFF <? print "$Dimensions";?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
<? print "$DimensionsFooter";?>>
<PARAM NAME=movie VALUE="<? print "$gotoFooter";?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="<? print "$gotoFooter";?>" quality=high bgcolor=#FFFFFF <? print "$DimensionsFooter";?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</center>
</BODY>
</HTML>
Thank you for your help!
Angela