majorbroncosfan
Programmer
I have been extremely successful using ASP and MS-SQL for a long time, but am having difficulty making a transition to PHP. I've tried to connect, but have been unsuccessful. The ASP version of my page goes like this:
db.open "Provider=SQLOLEDB;User Id=user;Password=password; Initial Catalog=database;Data Source=DATABASESERVER\SQLSERVER;"
The PHP version I've used goes like this:
<?
$db_name = "intranet";
$table_name = "tester";
$connection = @mssql_connect("DATABASESERVER\SQLSERVER", "userid", "password" or die("Couldn't connect"
$db = @mssql_select_db($db_name, $connection) or die("Couldn't select database."
$sql = "INSERT INTO $table_name (testID, testName) VALUES (\"1234\", \"Jeff\"";
$result = @mssql_query($sql, $connection) or die("Couldn't execute query"
?>
Please help!
db.open "Provider=SQLOLEDB;User Id=user;Password=password; Initial Catalog=database;Data Source=DATABASESERVER\SQLSERVER;"
The PHP version I've used goes like this:
<?
$db_name = "intranet";
$table_name = "tester";
$connection = @mssql_connect("DATABASESERVER\SQLSERVER", "userid", "password" or die("Couldn't connect"
$db = @mssql_select_db($db_name, $connection) or die("Couldn't select database."
$sql = "INSERT INTO $table_name (testID, testName) VALUES (\"1234\", \"Jeff\"";
$result = @mssql_query($sql, $connection) or die("Couldn't execute query"
?>
Please help!