[SOLVED]database connection problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
rubberjohn
Forum Contributor
Posts: 193
Joined: Fri Feb 25, 2005 4:03 am

[SOLVED]database connection problem

Post by rubberjohn »

is there a problem with this code or have i not set up my db correctly?

Code: Select all

<?php


$hostname_myconnection = "localhost";

$database_myconnection = "XXX"; 

$username_myconnection = "XXX";

$password_myconnection = "XXX";

$myconnection = mysql_pconnect($hostname_myconnection, $username_myconnection, $password_myconnection); or trigger_error(mysql_error(),E_USER_ERROR); 

mysql_select_db($database_myconnection, $myconnection); 
?>
this is put above the webroot and INCluded in my pages

thanks in advance for your help

rj
Post Reply