digital-cipher
01-09-2005, 10:36 AM
Hi all
can anyone show me how to set a image to centre of page and a black background in this php script
Im new to PHP :)
<?php
if(!isset($Id))
{
die("Need 'Id' parameter");
} else
{
$Id=addslashes($Id);
}
include("common.php");
//set up SQL connection
$link = mysql_connect ($server, $user, $password);
if (! $link)
{
die ("Couldn't connect to mySQL server");
}
if (!mysql_select_db ($db, $link) )
{
die ("Couldn't open $db: ".mysql_error() );
}
$query = "SELECT filetype, bin_data FROM tbl_Files WHERE id_files='$Id';";
$result = mysql_query($query);
$query_data = mysql_fetch_array($result);
$bin_data = $query_data[bin_data];
$filetype = $query_data[filetype];
Header("Content-type: $filetype");
print $bin_data;
?>
ive tryed echo "<body bgcolor=\"#ffffff\" text=\"#000000\">"
but still no good.
can anyone show me how to set a image to centre of page and a black background in this php script
Im new to PHP :)
<?php
if(!isset($Id))
{
die("Need 'Id' parameter");
} else
{
$Id=addslashes($Id);
}
include("common.php");
//set up SQL connection
$link = mysql_connect ($server, $user, $password);
if (! $link)
{
die ("Couldn't connect to mySQL server");
}
if (!mysql_select_db ($db, $link) )
{
die ("Couldn't open $db: ".mysql_error() );
}
$query = "SELECT filetype, bin_data FROM tbl_Files WHERE id_files='$Id';";
$result = mysql_query($query);
$query_data = mysql_fetch_array($result);
$bin_data = $query_data[bin_data];
$filetype = $query_data[filetype];
Header("Content-type: $filetype");
print $bin_data;
?>
ive tryed echo "<body bgcolor=\"#ffffff\" text=\"#000000\">"
but still no good.