MySQL connect question, using 000webhost.com.
Posted: Sun Jan 24, 2010 5:29 am
EDIT: Nevermind, I got it right. (code is updated) lol
When I try to connect to the DataBase, I get this message:
my code is:
What am I supposed to put for the 3rd field of $db? I've tried my data base password and hosting pass word, but neither make the error go away. Do I have the first and second field right for $db? lol.....As you can see, I'm completely confused on how to connect to the data base. 
EDIT: Nevermind, I got it right. (code is updated) lol
When I try to connect to the DataBase, I get this message:
Code: Select all
Warning: mysql_connect() [function.mysql-connect]: Host '66.197.250.117' is not allowed to connect to this MySQL server in /home/a8504274/public_html/connect.php on line 5
Could not connect to data base.Code: Select all
<?php
$db = mysql_connect("mysql14.000webhost.com",
"a8504274_zerk",
"password") or die("Could not connect to db");
if(!$db)
die("no db");
if(!mysql_select_db("a8504274_void",$db))
die("No Database Selected");
?>EDIT: Nevermind, I got it right. (code is updated) lol