I can manage my things in vbnet but this is complete new to me
I have installed php on my homeserver, made exact the same table in mssql (the countries table)
id (varchar(2))
name (varchar(50))
population (smalint)
Then made the countries.php but I think that is not correct, put it on my server, if I run the file then I get
Error occured
An error has occured in sub: java.lang.Exception:Sub hc_responseerror signature does not match expected signature. Continue? if I press yes then nothing happens, so I think the connection is good username and password also or am I wrong.
What do I need to change in the countries.php
<?
$databasename = "wonen";
// Server in the this format: <computer>\<instance name> or
// <server>,<port> when using a non default port number
$server = 'number to server';
// Connect to MSSQL
$link = mssql_connect($server, 'usrnm', 'psswrd');
if (!$link) {
die('Something went wrong while connecting to MSSQL');
}
mysql_select_db($databasename) or die(mysql_error());
$query = file_get_contents("php://input");
$sth = mysql_query($query);
if (mysql_errno()) {
header("HTTP/1.1 500 Internal Server Error");
echo $query.'\n';
echo mysql_error();
}
else
{
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
$rows[] = $r;
}
print json_encode($rows);
}
?>