How do I make php works in PHP 7

0 favourites
  • 3 posts
From the Asset Store
Paypal PHP Supports multiple platforms, Web/html5 Android, IOS. (Including storing transaction data)
  • 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]
  • 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.

  • Try Construct 3

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

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