colap Posted November 3, 2009 Share Posted November 3, 2009 <?php class cl_ { public function fc() { $host="localhost"; $user="root"; $password="aaaaaaaaa"; $database_name="a"; mysql_connect("$host","$user","$database_name")or die('Could not connect: ' . mysql_error()); mysql_select_db("a"); } } ?> Quote Link to comment Share on other sites More sharing options...
marcus Posted November 4, 2009 Share Posted November 4, 2009 mysql_connect uses the parameters in this order: host, username, password you have it: host, username, database? Quote Link to comment Share on other sites More sharing options...
colap Posted November 4, 2009 Author Share Posted November 4, 2009 Solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.