Re: binary data

From: Lo Dolce Pesca (herefishyfishy_at_spam.org)
Date: 04/16/04


Date: Fri, 16 Apr 2004 08:58:35 -0400

Jon Kraft" <jon@jonux.co.uk> wrote:
>
> Shouldn't that be $_POST['submit'] ?
>
> And above: $_SERVER['PHP_SELF'] ?
>
> JOn
........................

Jon,
Thank you.

When checking through the command line the file has been uploaded to mysql
server.

However if I click on getdata.php

it doesnt retrieve the file for display using the following code below.

Thank you for your time.

Best...
TR
..........................

<?php

if($_GET['id']==1) {//40
@myql_connect("localhost","root","mypass");
@mysql_select_db("sitename");
$query = "SELECT bin_data,description,filetype
          FROM binary_data
          WHERE id=1";
$result = @mysql_query($query);
$data = @mysql_result($result,0,"bin_data");
$description = @mysql_result($result,0,"description");
$type = @mysql_result($result,0,"filetype");
Header( "Content-type: $type");
echo $data."<br>";
echo $description."<br>";
}
else
 {

// you may have to modify login information for your database server:
@mysql_connect("localhost","root","mypass");
@mysql_select_db("sitename");
$query = "SELECT bin_data,description,filetype
          FROM binary_data
          WHERE id=$id";
$result = @mysql_query($query);
$data = @mysql_result($result,0,"bin_data");
$description = @mysql_result($result,0,"description");
$type = @mysql_result($result,0,"filetype");
Header( "Content-type: $type");
echo $data."<br>";
echo $description."<br>";
}
?>



Relevant Pages

  • Re: WEB SITE PROJECT DEPLOYMENT ~ Help please??
    ... ECHO When/If prompted with the question: ... The files are all now sitting on my Server, and when I load my web site, ... An error has occurred while establishing a connection to the server. ... The connection string specifies a local Sql Server Express instance using ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: AD Design Question
    ... "Jon" wrote in message ... What is the security ... If you have a publicly accessible machine such as an ISA Server that you may ... be using as the access point to your network from the public Internet. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Script Need to check disk space on remote servers
    ... Is it possible to get SQL Server database and log information (like ... echo Checking drives on Server %%S... ... REM this part of the script generates an HTML file with all the ... REM and then launches it using the default browser. ...
    (microsoft.public.windows.server.scripting)
  • Re: Script Need to check disk space on remote servers
    ... Is it possible to keept the process running by skipping over remote computer ... Is it possible to get SQL Server database and log information (like ... echo Checking drives on Server %%S... ... REM and then launches it using the default browser. ...
    (microsoft.public.windows.server.scripting)
  • Re: AD Design Question
    ... "Jon" wrote in message ... > At some of my sites, I currently have an ISA Server running. ... if I have a DC then I can keep authentication local to ...
    (microsoft.public.windows.server.active_directory)