PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You don't have a valid mysql resource. Which means the function doesn't think you are connected to the db. You probably are outside the function. If you have a $foo = mysql_connect(). Put $foo in the function by adding the following line inside the function:
Thanks. I have the connection set higher in the page and assumed that it would work. But I took your advice and placed it inside the function and it works perfectly.