@garyjohnson
When I echo the images varaible I get kids, which is what $images[3] is set to equal, but when I put it in the query the $result2 is echoed as resource id #4. Why is it doing that?
I think you really need to learn how a query works. Right now, you are lost. I help you a few occasions and I notice you don't understand how to connect to the db and also understand how to create a query plus I also mention you need to touch up with the MYSQL.
Like what TonyG_cyprus mention
You can't fetch Location from an $images[3]? Is Location a column? Is $images[3] a table?
$query2="SELECT Location FROM $images[3] WHERE Pic_id='1'";
Read this:
http://www.w3schools.com/sql/default.asp
LastMitch
Industrious Poster
4,212 posts since Mar 2012
Reputation Points: 134
Solved Threads: 336
Skill Endorsements: 45