I am using a windows 2000 server with Microsoft SQL
is there any special connection scripts.. to get the php to connect to the sql server
define('DATABASE',"aamcvb");
define('STYLE_SHEET',"goodsStyleSheet.css");
define('AMCVB_ADMIN', "");
define('DB_CONNECT_USERNAME', "username"); define('DB_CONNECT_PASSWORD', "password"); define('DB_HOST', "localhost"); define('PRODUCT_IMAGE_UPLOAD_FOLDER', "/images");
//$style = "goodsStyleSheet.css";
//define('JAVASCRIPT',"/goods.js");
//define('TMP_PATH',"");
//Do not change anything below this line when porting to another system
$DBMS_STARTED = FALSE;
$HTML_OPENED = FALSE;
$HTML_CLOSED = FALSE;
?>
<?php /************************************************** *************************************************
dataBaseConnect establishes connection to database and verifies user
*/
function databaseConnect (&$conn, &$db_id)
{
if ($conn = mysql_connect (DB_HOST, DB_CONNECT_USERNAME, DB_CONNECT_PASSWORD))
{
if ($db_id = mysql_select_db (DATABASE))
{
$GLOBALS["DBMS_STARTED"] = TRUE;
return;
}
Trace(" Cannot connect to database! MySQL Error Message: ".mysql_error(),
__FILE__, __LINE__);
SorryUnavailable(__FILE__, __LINE__);
}
Trace(" Cannot connect to MySQL DBMS server! MySQL Error Message: "
.mysql_error(), __FILE__, __LINE__);
SorryUnavailable(__FILE__, __LINE__);
}?>