Jump to content

database


alienmojo

Recommended Posts

Try using something like this:

 

$DBhost = "myserver.com";   // Replace myServer.com with the url (without http://) for your Database Server
$DBuser = "myLogin";                   // Replace myLogin with your login
$DBpass = "myPassword";             // Replace myPassword with your password
$DBName = "myDataBaseName";   // Replace myDatabaseName with your DB name
$table = "myTableName";             // I think you get the idea 
   
// Connect to mySQL Server
$DBConn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Error1 in Guest List Application: " . mysql_error());
// Select mySQL Database
mysql_select_db($DBName, $DBConn) or die("Error2 in Guest List Application: " . mysql_error());

Link to comment
https://forums.phpfreaks.com/topic/38650-database/#findComment-185565
Share on other sites

well im thinking that i dont have permission to do access the database because my connect is working (im not connecting as user and im not sure why its saying that) but anyway i have if statement testing the connection on the mysql-connect and mysql_select_db it its having a problem with the mysql_select_db

Link to comment
https://forums.phpfreaks.com/topic/38650-database/#findComment-185618
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.