0 Favourites

How do I make php works in PHP 7

  • 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]
  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
4,517 857,541
Tinimations's avatar
Tinimations
Unread sticky
1,586 437,366
matriax's avatar
matriax
Unread hot topic
378 33,278
part12studios's avatar
part12studios