MDanz Posted January 9, 2011 Share Posted January 9, 2011 it should display the image but nothing appears. what have i done wrong? echo "<img src=\"photo.php?id=$studentid\" alt='photo' />"; photo.php <?php $id= $_GET['id']; $getphoto= mysql_query("SELECT photo FROM Student WHERE SID=$id LIMIT 1"); $row5 = mysql_fetch_assoc($getphoto); $photogot = $row5['PHOTO']; header("Content-type: image/gif"); print $photogot; ?> Quote Link to comment Share on other sites More sharing options...
MDanz Posted January 9, 2011 Author Share Posted January 9, 2011 i get this error <b>Fatal error</b>: Using $this when not in object context in .. on line 5. line 5 is the query on photo.php Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted January 9, 2011 Share Posted January 9, 2011 you're not using $this on that line. i suspect the problem is actually on line 5 in .. (the part of the error message you left out) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.