Hello,
I am creating an upload material program for elearning. Now, I have an exe file, if I run it from my computer it's directly open a new browser and run it's content. Now, if I click the material list in my web browser, it's asking me to save the file instead of directly opening the files.
I would like to directly open the files (only for *.exe file), how to create the program like that?
This is the code that I have so far.
add_material.php
<?php
//LOAD MATERIAL TABLE
$result = mysql_query("SELECT * FROM material WHERE material.class_name='".$_GET['class_name']."'") or die(mysql_error());
?>
<table id="admintable" border="0" cellpadding="2" cellspacing="0">
<tr style="border:0;"><td style="border:0;"><?php echo "Class Name: ".$_GET['class_name']; ?><br><br></td></tr>
<tr>
<th>material</th><th>Post</th>
</tr>
<?php
$i=0;
while ($data = mysql_fetch_array($result)){
$result2=($i%2)?'#DFA09D':'white';
echo "<tr bgcolor='$result2'>";
echo '<td><a href="materialstorage/'.$data['material'].'">'.$data['material'].'</a></td>';
echo '<td style="width: 50px"><a href="add_material.php?class_name='.$data['class_name'].'&material_id='.$data['material_id'].'">Delete</a></td>';
echo '</tr>';
$i++;
}
?>
</table>