Can't seem to explain this. http://clickadx.com/image.php?id=2 Warning: Cannot modify header information - headers already sent by (output started at /home/clickadx/public_html/include/middle.php:36) in /home/clickadx/public_html/image.php on line 12 code for the image.php page <? include('include/function.php'); connect(); $id = $_GET['id']; $query = "SELECT * FROM images WHERE id='$id' LIMIT 1"; $image_type = $_GET['img']; $result = mysql_query($query); if($row = mysql_fetch_array($result)){ $imageData = $row['image']; $imageType = $row['type']; } header("Content-type: $imageType"); echo $imageData; ?> thats it never even calls the middle.php page
if you are trying to display your image i suggest you change the echo line to switch ($imageType) { case "image/gif": imagegif($imageData); break; case "image/jpeg": imagejpeg($imageData); break; case "image/png": imagepng($imageData); break; } Code (markup): as to the header error, you will need to double check all your code to make sure that you are sending everything in the right order, and not sending 2 headers.
I'm willing to bet that somewhere include/function.php is calling middle.php (either directly or indirectly). Also, you should get out of the habit of using short tags.
It was working perfectly, an I have not even touch the coding in awhile.. nothing has changed since it was working. An the function.php does not call the middle.php never. Middle.php is a template file. An on the line it states where the error in the middle.php is not a header being called at all.
Can you paste lines 30-40 of middle.php? Also, is there an error_log file in the directory with recent entries?
</div> <a href="/">Lost Pass?</a> <input type="submit" name="login" class="login-b" value="Login" /> </form> <?}}?> <?if($page =='members'){?> <div class="fst"> <span>Credits: 902</span> <span style="float:right;">Referral Link: http://clickadx.com/index.php?page=register&ref=username</span> </div> Code (markup): this is line 30-40 of middle.php an the error they say errors on line 36. which is <?if($page =='members'){?> EDIT: Fixed the problem, there was a bracket not closed in the function.php