please... can some one tell me what the problem with the following command.
@ $db = mysql_pconnect('localhost', 'root', 'somepassword');
if (!$db)
{
echo 'Error: Could not connect to database. Please try again later.';
exit;
}
php can not access to the database password
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
why are you doing that?
use
use
Code: Select all
$server = "localhost";
$user = "username";
$pass = "password";
$database = "database";
mysql_pconnect('$server', '$user', '$pass') or die(mysql_error());
mysql_select_db('$database') or die(mysql_error());