I am using PHP 4.2.2 to try and send an email out. But I need to run a query inside a function to get the people who will be emailed and such. The thing is when I try that I get a "Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /www/test.php on line 69" error. I have looked and everything about it is fine as far as setting up the mysql_access is concerned. So I am going to guess that it means that the database access set up outside the function is not global based so when I go into the function it doesn't think it is logged in.
Now assuming that all my guessing here was even right, my question is this:
Do I have to load the database from inside the function every time I send an email (which can be up to 7 times on top of whatever is going on outside the function) or is there a way I can make the mysql_connect a global setting?
Thanks,
Aludaan