Connect to MsSql using php
Sorry for the inexperienced question but i was curious to see if anyone could guide me along the right path of how to connect to MsSql using php.
<?php
$sql = odbc_connect("server", "username", "******");
$process = odbc_execute($sql);
if (!$process) {
$error = "Nope";
} else {
$error = "Yup";
};
echo $error;
?>
I tried that and it was a no go.
<?php
$sql = mssql_connect("server", "user", "*****");
if (!$sql) {
$error = "Nope";
} else {
$error = "Yup";
};
echo $error;
?>
<?php
$sql = mssql_pconnect("server", "user", "*****");
if (!$sql) {
$error = "Nope";
} else {
$error = "Yup";
};
echo $error;
?>
Neither of those worked. I'm assuming the problem is somewhere else but i have no clue, and relentless google searching didn't give me any other clues.
Moved over to the PHP forum where you will get better assistance.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks