I feel like I am missing something stupidly obvious here, I am trying to get the results of an SQL query and then using them in a loop. I feel like I am missing something st
Instead of your foreach(), you should do something like this (see the mysql_query() manual page for more):
foreach()
while($result = mysql_fetch_assoc($results)) { // your code }