![]() |
Does this PHP code look OK?
PHP Code:
The line the error references is $user = "DB_DB"; But I included the lines around it for better insight. |
Have you tried using all lower cases in your username?
|
Quote:
"DB_DB" is to edit out information that's "sensitive". |
Perhaps it's because there is a space in this line:
mysql_pconnect(localhost, $user,$pass) |
Try to use single qoutes ' rather then doubleqoutes "
or put qoutes around localhost also... |
Quote:
Quote:
|
put localhost in single qoutes
whitespace such as spaces, tabs, etc in code is ignored seems there s a prob with connection rather than anything else at this point i've never used mysql_pconnect, see if mysql_connect works better for you. |
Hope you're putting that function in an include file as opposed to on a page, or have multiple DBs at different locations to use... you only need to connect to a mySQL server once each load.
Matt |
Is your username the same as the database name?
|
here is a good sample for you from php manual:
Code:
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password') or die (mysql_error()); |
err in above post
db_selected = $db_selected |
All times are GMT -7. The time now is 03:26 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123