Ingres Community Forums Login Register Ingres.com  

Ingres Community Wiki

Navigation
Learn About
Developing With
Ingres Talk
Information
Toolbox

PHP - Connecting with a dbms password

From Ingres Community Wiki

Jump to: navigation, search
<?php

$database='dbname';
$user='user';
$password='password';


$options = array( "dbms_password" => "letmein");

$user = "secureuser";
$password = "53cur3p455";

$conn=ingres_connect($database,$user,$password, $options);

if ( ingres_errno($conn) ) {
    $error_code=ingres_errno();
    $error_text=ingres_error();
    $error_sqlstate=ingres_errsqlstate();
    printf ( "Error during connect : %s\n\r",$error_code);
    printf ( "Error during connect : %s\n\r", $error_text);
    printf ( "Error during connect : %s\n\r", $error_sqlstate);
    die("i died");
} 
else
{
    echo "Connection succeeded.";
}

ingres_close($conn);
?>

Back to PHP Driver Examples

Personal tools
© 2009 Ingres Corporation. All Rights Reserved