ahsesino Posted December 31, 2011 Share Posted December 31, 2011 Hello guys, I'm trying to figure out how to display and image that is located in one table (profile) and make it correspond to a variable on another table (latest_post) to where you echo out the variable from the table(latest_post) and the image from table(profile) appears next to the post. any how here is my code: <?php $query = mysql_fetch_array(mysql_query("SELECT person FROM latest_post AND avatar_img FROM profile WHERE id FROM latest_post = id FROM profile ")); echo $query['avatar_img']; ?> Also when echoing out the query I only get the name of the image and not the image this is most likely because my image is stored in a different folder right? Thanks in advance, your help is much appreciated since I'm barely a beginner at php and MySQL. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.