Hey guys,
Thanks for all the work on the ecards. I have been trying to follow and create some for a site but I have hit a snag. I have spent the last few hours reading through the posts - I fixed the field checking error i had to do this instead in my actions layer.
send.onRlease() = function() {.....}
It checks for empty fields, but if I put the right info in, it goes through to the the final else statement, yet does not send correctly.
I have made the folder 777 and this is the error I recieve.
*****************************
Warning: fopen(/dbText/1185351867.txt) [function.fopen]: failed to open stream: No such file or directory in /home/josesmex/public_html/ecards/SendEcard.php on line 30
Warning: fwrite(): supplied argument is not a valid stream resource in /home/josesmex/public_html/ecards/SendEcard.php on line 31
Warning: fclose(): supplied argument is not a valid stream resource in /home/josesmex/public_html/ecards/SendEcard.php on line 32
_root.Status=Success your Card Has Been Sent!
**********************
THis is the code for sendphp
***************************
<?
$createEcard = date(U);
$filename = $createEcard.".txt";
$toEmail = $_POST["toEmail"];
$fromEmail = $_POST["fromEmail"];
$toName = $_POST["toName"];
$fromName = $_POST["fromName"];
$greeting = $_POST["greeting"];
$cardMessage = $_POST["cardMessage"];
$ecardSelection = $_POST["ecardSelection"];
$toName = stripslashes($_POST["$toName"]);
$fromName = stripslashes($_POST["$fromName"]);
$greeting = stripslashes($_POST["$greeting"]);
$cardMessage = stripslashes($_POST["$cardMessage"]);
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
$Created="Ecard Created on $Today";
$ecardNum = $ecardSelection;
$ecardText = "toName=$toName&toEmail=$toEmail&fromName=$fromName&fromEmail=$fromEmail&greeting=$greeting&cardMessage=$cardMessage&Created=$Created";
$fp = fopen( "/dbText/$filename","w");
fwrite($fp, $ecardText, 10000);
fclose( $fp );
######Email Card########
## You can change the subject and the message part around.
## Make sure to change the Link as stated in the Tutorial.
## (Change from 'someSite' to your actual site - leave the rest the same
$ToSubject = "You have recieved a Flash Ecard from $fromName and Jose's Mexican Food";
$Message = "$toName,\nYou have recieved a Flash Ecard from $fromName and Jose's Mexican Food. \nClick the following link to view your card:\n\n
http://www.josesmexicanfood.com/ecards/SelectCard.php?ecardText=$createEcard&eNum=$ecardNum\n\n-----------------------------------\nHere is the message that was sent:\n$toName,\n$greeting\n$cardMessage\n\n-$fromName\n\n\n-----------------------------------";
###################
## This line actually sends the email - you should not have to change this.
mail("$toName <$toEmail>",$ToSubject, $Message, "From: $fromName <$fromEmail>");
## This next line returns a success message to the movie.
print "_root.Status=Success your Card Has Been Sent!";
#### End #########
## By: Jeffrey F. Hill
##
www.flash-db.com?>
*******************************
code for selection
*****************************
<HTML>
<HEAD>
<TITLE>Here's your Flash Ecard - from Jose's Mexican Food</TITLE>
<?
$eNum = $_GET["eNum"];
$ecardText = $_GET["ecardText"];
switch ($eNum) {
case '1':
$goto = "ecard1.swf?ecardText=".$ecardText;
$Dimensions = "WIDTH=600 HEIGHT=400";
break;
case '2':
$goto = "ecard2.swf?ecardText=".$ecardText;
$Dimensions = "WIDTH=600 HEIGHT=400";
break;
case '3':
$goto = "ecard3.swf?ecardText=".$ecardText;
$Dimensions = "WIDTH=600 HEIGHT=400";
break;
}
?>
</head>
<body bgcolor="#009933" topmargin="10" 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>
</center>
</BODY>
</HTML>