How do I make php works in PHP 7

Get help using Construct 2

Post » Sat Jan 28, 2017 1:21 pm

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?...

Code: Select all
<?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");
}
}
?>
Last edited by db3344 on Sat Jan 28, 2017 4:14 pm, edited 1 time in total.
B
18
S
6
G
2
Posts: 38
Reputation: 1,889

Post » Sat Jan 28, 2017 2:31 pm

@db3344

This is the 'Construct 2' How Do I section - not the php section.

Such questions should really be asked on a php forum and not here.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,375
Reputation: 58,432

Post » Sat Jan 28, 2017 2:50 pm

zenox98 wrote:
This is the 'Construct 2' How Do I section - not the php section.

Such questions should really be asked on a php forum and not here.

I use this script for getting server time for me C2 games...
B
18
S
6
G
2
Posts: 38
Reputation: 1,889


Return to How do I....?

Who is online

Users browsing this forum: David181, shawnzien and 7 guests