I use simple PHP script to fetch server time from sql server, it's works fine in PHP 5.1 - 5.5, but in php 7 it not working please help how to write in PDO stile?...
<?php
header('Access-Control-Allow-Origin: *');
$mysql_host = "localhost";
$mysql_database = "xxxx";
$mysql_user = "yyyy";
$mysql_password = "zzzz";
$link = mysql_connect($mysql_host, $mysql_user, $mysql_password) or die("error" );
mysql_select_db($mysql_database, $link) or die ('error');
if(isset($_POST['login'])) $login = $_POST['login'];
if(isset($_POST['password'])) $password = $_POST['password'];
if(isset($login) && isset($password)){
if($passwordbd == $password){
$r11 = mysql_query("SELECT UTC_DATE() ");
$result = mysql_fetch_array($r11);
$r11=$result['UTC_DATE()'];
echo $r11;
}
else{
echo("error");
}
}
?>[/code:2bfuetn3]