Help - Search - Members - Calendar
Full Version: Cannot Connect To Mysql Database
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
flyfisher
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_StockTracker = "localhost";
$database_StockTracker = "stocktracker_zxq_stocks2";
$username_StockTracker = "356040_raz";
$password_StockTracker = "******";
$StockTracker = mysql_pconnect($hostname_StockTracker, $username_StockTracker, $password_StockTracker) or trigger_error(mysql_error(),E_USER_ERROR);
?>
ssfdre38
make sure you have assign the db user to the db and change mysql_pconnect to mysql_connect and it will work
flyfisher
QUOTE(flyfisher @ Dec 30 2010, 07:00 PM) *
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_StockTracker = "localhost";
$database_StockTracker = "stocktracker_zxq_stocks2";
$username_StockTracker = "356040_raz";
$password_StockTracker = "******";
$StockTracker = mysql_pconnect($hostname_StockTracker, $username_StockTracker, $password_StockTracker) or trigger_error(mysql_error(),E_USER_ERROR);
?>




QUOTE(flyfisher @ Dec 30 2010, 07:00 PM) *
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_StockTracker = "localhost";
$database_StockTracker = "stocktracker_zxq_stocks2";
$username_StockTracker = "356040_raz";
$password_StockTracker = "******";
$StockTracker = mysql_pconnect($hostname_StockTracker, $username_StockTracker, $password_StockTracker) or trigger_error(mysql_error(),E_USER_ERROR);
?>


Thanks, getting rid of the "p" in "pconnect" did the trick! Thanks again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.