Page 1 of 1

[SOLVED]database connection problem

Posted: Thu Jan 26, 2006 4:17 pm
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