i am new to this forum.
i have developed a page in that some radio buttons are there associcated with the values as .swf file names. if i clicked one radio button that corresponding swf file is going to be downloaded.and at the same time a mail will also go to the admin.
wat i facing the problem is that .swf video file is not downloading properly .mail will be going with out any problem.
pls help me........
for that i have devloped the code as shown below.
HTML code:
-------------------
HTML Code:
<form name="form" method="post" action="optionpage1.php"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top"> </td> <tr> <tr> <td align="left" valign="top" class="text">Check the box of the video you would like to watch and get instant access on the very next page!</td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top" style="width:30px; height:25px;"><input type="radio" name="download" value="direct_mail_campaigns_recorded" id="download1" /></td> <td align="left" valign="top" class="text">Dominant Direct Mail Campaigns (take over the entire subdivision)</td> </tr> <tr> <td align="left" valign="top" style="height:25px;"><input type="radio" name="download" value="Getting the Edge at Listing Appointments FLASH" id="download2"/></td> <td align="left" valign="top" class="text">Getting the Edge at Listing Appointments</td> </tr> <tr> <td align="left" valign="top" style="height:25px;"><input type="radio" name="download" value="Price Reductions FLASH" id="download3" /></td> <td align="left" valign="top" class="text">Techniques for getting Price Reductions (get your listings sold!)</td> </tr> <tr> <td align="left" valign="top" style="height:25px;"><input type="radio" name="download" value="USP'S FLASH" id="download4"/></td> <td align="left" valign="top" class="text">Unique Selling Propositions (build a 100ft wall from your competition)</td> </tr> <tr> <td align="left" valign="top" style="height:25px;"><input type="radio" name="download" value="Divorce Estate Attorneys FLASH" id="download5"/></td> <td align="left" valign="top" class="text">Getting Divorce and Estate Attorneys to hand you highly motivated prospects</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top" style="height:10px;"></td> </tr> <tr> <td align="left" valign="top"> </td> </tr> <tr> <td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="right" valign="top" class="mailtxt" style="width:200px; height:25px;">Enter Your First Name :</td> <td align="left" valign="top" style="padding-left:5px;"><input name="name" type="text" class="text2" size="25" /></td> </tr> <tr> <td align="right" valign="top" class="mailtxt" style="width:200px; height:25px;">Type In Your E-mail Address : </td> <td align="left" valign="top" style="padding-left:5px;"><input name="email" type="text" class="text2" size="25" /> </td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top" style="height:10px;"></td> </tr> <tr> <td align="center" valign="middle"><table width="0" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td bgcolor="#9f0000"><input name="Button" type="submit" class="h2" value="Claim Your FREE Videos Now!"/></td> </tr> </table></td> </tr> <tr> <td> </td> </tr> </table> </form>
php code:
---------------
PHP Code:
<?php
//print_r($_POST);exit;
$download=$_POST['download'];
$name=$_POST['name'];
$email=$_POST['email'];
//echo $download;
//echo $email;
if(($download!='')&&($email!=''))
{
$file = $download;
header("Content-type: application/swf");
header("Content-Disposition: attachment; filename=".$file);
readfile($file);
$subject="Download video files details from Scott Jackson Real Estate Marketing";
$message="Dear Admin, <br><br> I have downloaded '$download' \t\t file.";
$message=$message."<br><br>Regards<br>$name";
$headers="MIME-Version: 1.0"."\r\n";
$headers.="From:$email\r\n";
$headers.="Content-type: text/html "."\r\n";
$to="aaa@yahoo.com";
mail($to,$subject,$message,$headers);
}

