Advertisement
hadar

Untitled

May 15th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1.       <?
  2.      
  3. $easyhostname = 'XXXXX';
  4. $easyusername = 'XXXXX';
  5. $easypassword = 'XXXXX';
  6. $easydb = 'XXXXX';
  7.      
  8.       mysql_connect($easyhostname,$easyusername, $easypassword) OR DIE ('Unable to connect to database! Please try again later.'. mysql_error());
  9.       mysql_select_db($easydb);
  10. if(isset($_GET['id']))
  11. {
  12. $id = $_GET['id'];
  13. $query = "select * from groups where id='$id'";
  14.  
  15. $result = mysql_query($query) or die('Error, query failed');
  16.     $row = mysql_fetch_row($result);
  17.      {
  18.        $data = $row['FileData'];
  19.        $type = $row['ContentType'];
  20.       }
  21.       header('Content-type: ' . $type);
  22.       echo $type;
  23.       echo $data;
  24. }
  25.  
  26.  
  27.       echo "this is a test to see if the page loaded on the bottom";
  28.       ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement