ensanity Posted April 18, 2007 Share Posted April 18, 2007 Hey there, I'm pretty new to working with MySQL and PHP. I'm trying to connect to my database thats hosted on yahoo!. When I go into phpMyAdmin the server says: www.urlhere.com The PHP that i've tried using to connect are as follows: <?php $Database = mysql_connect ("localhost", "usernamehere", "passwordhere") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db("bamboo" , $Database); ?> and <?php $Database = mysql_connect ("www.urlhere.com", "usernamehere", "passwordhere") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db("bamboo" , $Database); ?> am I doing something incorrect? Or is yahoo! just whack? Quote Link to comment https://forums.phpfreaks.com/topic/47514-noobie-connecting-to-mysql/ Share on other sites More sharing options...
bubblegum.anarchy Posted April 18, 2007 Share Posted April 18, 2007 The connection details required should be available from the database host, in this case, yahoo - check the faq at yahoo? Quote Link to comment https://forums.phpfreaks.com/topic/47514-noobie-connecting-to-mysql/#findComment-231935 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.