error_reporting(E_ALL); if(isset($_GET['id'])) { $link = mysql_connect("localhost","rkelley","Wp4UKBU:yBvcZrxt"); mysql_select_db("website"); $id = $_GET['id']; $query = "SELECT name, type, size, path FROM rkelley WHERE id = '$id'"; $result = mysql_query($query) or die('Error, query failed'); list($name, $type, $size, $filePath) = mysql_fetch_array($result); header("Content-Disposition: attachment; filename=$name"); header("Content-length: $size"); header("Content-type: $type"); readfile($filePath); exit; } ?>
|
|||||||||||||||||||||||||
Original web created by Andy Archer. Maintained by Jared Sturge, Theo Browne, Brett Simmons, and Arthur Dooner. Web Programming by Dave Murphy and Pat Cable II. There are links to resources on these pages that are maintained by independent sources. Silver Lake Regional High School is not responsible for the content or opinions on these pages. |
|||||||||||||||||||||||||