PHP Database Connect

Hi There,
I am struggling a bit with this. i have this code but it is not connecting
[php]

<?php $host = 'LOCATION OF MY DATABASE HERE'; $username='SYSDBA'; $password='masterkey'; $dbh = ibase_connect($host, $username, $password) or die ("error in dbh connect"); ?>

[/php]

Please help!

I’ve never used iBase before but try something like this to get the exact error message:

[php]…or die ("error in dbh connect: " . ibase_errmsg()); [/php]

http://www.php.net/manual/en/function.ibase-connect.php

$user = “Enter_Username_Here”;
$password = “Enter_Password_Here”;
$database = “Enter_Name_Of_Database_Here”;
$host = “Enter_Host_Name_Or_Host_IP_OR_localhost_Here”;

// Connect to database
mysql_connect($host,$user, $password);
@mysql_select_db($database) or die( “Unable to select database”);

What error you are receiving? Cross check the host,username password and also whether database server is running. Also, refer: http://php.net/manual/en/function.ibase-connect.php

Sponsor our Newsletter | Privacy Policy | Terms of Service