Jump to content

Connection error


webdevdea

Recommended Posts

I am in the process of learning.. 

I am working on some code from my book trying to get my database connected and I must have something mixed up somewhere 

 

THIS IS THE CODE I AM REPLACING IT WITH( i have used anonymous usernames and passwords and such)

$connect = mysql_connect("localhost","user","password") or die ("Could not connect.");
mysql_select_db("databasename") or die ("Could not find database");
$dbname='databasename';
?>

code from book

$connect = mysql_connect("mapswidgetsusers.db.3618229.hostedresource.com","mapswidgetsusers","MtM2008yG5") or die ("Could not connect.");
mysql_select_db("mapswidgetsusers") or die ("Could not find database");
$dbname='mapwidgetsusers';
?>
Link to comment
https://forums.phpfreaks.com/topic/283863-connection-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.