Im trying to insert into a table remotely. And my database is MS sql server 2016 I tried something like this but it did not work:
define("DB_SERVER", "192.168.50.112");
define("DB_USER", "srv-website");
define("DB_PASS", "Website4JET$");
define("DB_NAME", "FTECHDAS01");
define("TBL_USERS", "[2016_TestJET].[dbo].[Persons]");
$connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection) or die(mysql_error());
function addNewUser($id, $name) {
global $connection;
$q = "INSERT INTO ".TBL_USERS." ([PersonID],[LastName]) VALUES ('$id', '$name')";
return mysql_query($q, $connection);
}
but I got always :
Not Found
HTTP Error 404. The requested resource is not found.
what should I do? and what should change in the remote server !?