Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.