Re: binary data
From: Lo Dolce Pesca (herefishyfishy_at_spam.org)
Date: 04/16/04
- Next message: Jon Kraft: "Re: binary data"
- Previous message: Brian: "Re: Split Function and Week Numbers"
- In reply to: Jon Kraft: "Re: binary data"
- Next in thread: Jon Kraft: "Re: binary data"
- Reply: Jon Kraft: "Re: binary data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>";
}
?>
- Next message: Jon Kraft: "Re: binary data"
- Previous message: Brian: "Re: Split Function and Week Numbers"
- In reply to: Jon Kraft: "Re: binary data"
- Next in thread: Jon Kraft: "Re: binary data"
- Reply: Jon Kraft: "Re: binary data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|