(10-10-2009, 10:44 AM)andrewjs18 Wrote: I'm testing this on a web host- hostmonster
and yes, there's a password. I've checked all of my other files that connect to a db and they all use localhost as the host.
Ok if they all use localhost as host that isn't the problem.
But if you have a script that already connects to your database without errors you can always include it in this script.
The script I've posted does connect to the database without errors, so I can only guess that there is a error within the $db array.
Try one of your settings from other files that connect to the database and create the table mails in the database that the script uses.