Hi having an issue showing an image from a blob field in mysql, with a load of text from another table below it.
the page will show the blob image, but none of the text fields show below the image.
<?php
$_SESSION['othf']= $_POST['othf'];
$_SESSION['newRight']= $_POST['newRight'];
$_SESSION['un']= $_POST['un'];............................
passing the variables from the previous page.. all works ok
..............$off_yn = $_POST['off_yn'];
$off_more = $_POST['off_more'];
$ts5 = $_POST['ts5'];
//upload file/logo
if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0)
{
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];
$fp = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);
if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}
$conn = mysql_connect('localhost','root','') or trigger_error("SQL", E_USER_ERROR);
$db = mysql_select_db('minisite',$conn) or trigger_error("SQL", E_USER_ERROR);
$query = "INSERT INTO upload (name, size, type, content,pw,un ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content','$pw','$un')";
mysql_query($query) or die('Error, query failed');
//include '../library/closedb.php';
}
$row = mysql_fetch_array(mysql_query("SELECT content FROM upload WHERE id = LAST_INSERT_ID() "));
header("Content-type: image/jpg");
print $row['content'];
<!-- NOTHING SHOWS BELOW THIS POINT -->
$tc4 = $tc1.'<br/> '.$tc2.'<br/> '.' '.$tc3;
?>
have tried this next part echoed out as a php string, no success..
<html><head><title>Upload Logo</title>
<style type="text/css">
a {
color: #e16500;
}
STYLE SHEET BITS HERE
</style></head>
<body><div id="main"><p>The following information was successfully added to our database ... please take a few moments to review and update as necessary:</p>
<h3>Registration information created: $cre </h3>
<p>File $fileName uploaded</p>
<p>Your Username is $un and your password is $pw.</p>
<p>You are: $fn $ln, $ttl</p>
LOTS OF MIXED HTML AND VARIABLES
...... ype="hidden" name="ts7" value=" $ts7">
<input type="hidden" name="ts5" value=" $ts5">
<input type="submit" input id="update" value="Click here to update your details" >
</form> </body>
</html>
so the page is a summary page, showing the previous form details filled in, with the logo of the completing company displayed, but it just shows the image, and nothing below it..
can't work out why its doing this, have been looking all over.. is this to do with headers? or not really?
thanks!