Jump to content

buddyram

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

buddyram's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?php $fname = $_GET['q']; mysql_connect('localhost', 'root', ''); mysql_select_db('db_name'); $q = mysql_query("SELECT * from files where file_name = '$fname' "); if(mysql_num_rows($q) == 1) { while($row = mysql_fetch_array($q)) { $contents = stripslashes($row['file_content']); header("Content-length: {$row['file_size']}"); header("Content-type: {$row['file_type']}"); header("Content-Disposition: attachment; filename=$fname"); echo $contents; } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.