After countless hours of searching and searching and searching, i came up with this scrip to try to make a php5.6 -> SQL server 2000 connection, it actualy works doesn't show any error but...Doens't send data to the actual database
Do you guys know any way of making this work? It's making me crazy! Cause the connection works, then? Why it doens't transfer the data to the database colums?
Thanks :D
PHP Code:
<?php
$awnser = "nuncavida";
$password2 = "12345678";
$question = "Ratos";
$mail = "exemplohotmail";
$accountN = "09101410275852";
$database = "account";
$user = "sa";
$password= "1234";
$server = "localhost";
$conn = odbc_connect("Driver={SQL Server Native Client 10.0};Server=$server;Database=$database;", $user, $password);
if($conn){
die(print_r(sqlsrv_errors(), true));
}
$db_selected = mysql_select_db($database, $conn);
if (!$db_selected) {
die('Can\'t use ' .$database. ': ' .mysql_error());
}
$value = $_POST['input1'];
$dk_time=strftime("%y%m%d%H%M%S");
list($usec1, $sec1) = explode(" ",microtime());
$dk_user_no=$dk_time.substr($usec1,2,2);
mssql_query("Insert Into [TBL_USER] Values ('09101410275532', 'tiaguim32', '12345', 'wefew', 'wefewefw', 'wefeww', '25.66.7.153')");
mysql_close();
?>
Thanks :D