images php coding issues or problems here.
3 posts • Page 1 of 1
This won't work if you've printed/echoed anything to your page before the header, have you done that? How about if you have just the header and the variable on a page and call that page from your first page, e.g.
Code: Select all
//page 1 $result=mysql_query("SELECT * FROM LetterImages WHERE LetterID=1 AND Page=1"); //fetch data from database $sqldata=mysql_fetch_array($result); $encoded=stripslashes($sqldata['Data']); $ftype=$sqldata['Type']; require 'page2.php'; //page 2 //tell the browser what type of image to display header("Content-type: $ftype"); //decode and echo the image data print $encoded;
Who is online
Users browsing this forum: No registered users and 3 guests