Forum Moderators: coopster
echo '<form enctype="multipart/form-data" action="./admin.php?page=item&action=search_title" method="post">';
echo '<div align="left">Title:</div><input name="item_title" type="text" id="item_title" size="50" />';
echo '<input type="submit" name="Submit" value="Submit"/><input type="hidden" name="title_submitted" value="TRUE" /></form>';
if (isset($_POST['title_submitted'])){
//QUERY THE DATABASE
echo 'Ran!';
$query = 'SELECT * FROM items WHERE MATCH (i_title) AGAINST (\'' . $_POST['item_title'] . '\' IN BOOLEAN MODE)';
$result = mysql_query($query);
while($r = mysql_fetch_array($result)){
echo '<p>' . ($r['i_title']) . '</p>';
echo '<p>' . ($r['i_sport']) . '</p>';
echo '<p>' . ($r['i_type']) . '</p>';
echo '<p>' . ($r['i_location']) . '</p>';
echo '<p>' . ($r['i_description']) . '</p>';
echo '<p>' . ($r['i_cost']) . '</p>';
echo '<p>' . ($r['i_shipcost']) . '</p>';
$img1 = imagecreatefromstring($r['i_pic1']);
$img2 = imagecreatefromstring($r['i_pic1']);
header('Content-Type:image/jpeg');
header('Content-Disposition: inline, filename:file.jpg');
echo '<img src="';
echo imagejpeg($img1);
echo ' ">';
//echo '<img>' . imagejpeg($img2) . '</img>';
}
}
break;
That is the excerpt I have checked all of my files includes and all for extra chars at the beginning and end of the php tags and they look fine it only seems to happen here
What I'm trying to do is get my jpeg blob from my database (which it pulls perfectly) and convert it back to a jpeg to use in my page... here is where the problem is I only get the binary code and with the header statements I get the all too common headers error... any ideas I am using dreamweaver 8 to edit the php code ( I need to get off my you know what and download notepad++ again...) but I think as far as the whitespace goes I'm good
By the way, Welcome to WebmasterWorld!
P.S. Another solution is to put everything into a buffer [us3.php.net], and echo it out after you set the headers.