|
please reply me about this problem. Warning: odbc_execute(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]The server principal "PC-2-PC\PC-2" is not able to access the database "PS_UserData" under the current security context., SQL state 08004 in SQLDescribeParameter in C:\xampp\htdocs\registration\register.php on line 27...
please
when my code is looks like this the register.php fill up form appears but still errors occur when i submit it to database.
<?php
// Database configuration parameters
$dbHost = 'PC-2-PC';
$dbUser = '';
$dbPass = '';
$GLOBALS['dbConn'] = @odbc_connect("Driver={SQL Server};Server={$GLOBALS['dbHost']};",$GLOBALS['dbUser'],$GLOBALS['dbPass']) or die('Database Connection Error!');
if(!$GLOBALS['dbConn']){
exit("Connection failed:".odbc_errormsg());
}
?>
and when i put the dbhost/dbuser/dbpass/ like what in your post sir. it says "Database Connection error!" please help me.
<?php
// Database configuration parameters
$dbHost = '127.0.0.1';
$dbUser = 'shaiya';
$dbPass = 'shaiya123';
$GLOBALS['dbConn'] = @odbc_connect("Driver={SQL Server};Server={$GLOBALS['dbHost']};",$GLOBALS['dbUser'],$GLOBALS['dbPass']) or die('Database Connection Error!');
if(!$GLOBALS['dbConn']){
exit("Connection failed:".odbc_errormsg());
}
?>
|