Identical mysql_connect code errs in other page.

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!

Moderator: General Moderators

Post Reply
waitingforzion
Forum Newbie
Posts: 1
Joined: Sat Aug 07, 2010 10:07 am

Identical mysql_connect code errs in other page.

Post by waitingforzion »

Hey, I've just started learning PHP and mysql. I'm pretty sure I've been coding correctly. I have an account on 000webhost with a few php files for testing, all which connect to the mysql database with the same exact code. However, when I run one of the pages, "editpostview.php" it generates this error:

Warning: mysql_connect() [function.mysql-connect]: Host 'srv37.000webhost.com' is not allowed to connect to this MySQL server in /home/a6844778/public_html/editpostview.php on line 2

And I cannot figure out what is wrong with the code. The first line is identical to index.php, and that page loads just fine.
Post Reply