• Connecting database issue in PHP/Mysql

    Ganesh Member
    
    

    How should the connection look like this

  • ShikhaTan Member
    
    
  • Adelaid Member

    Remember that mysql_ functions are deprecated as of PHP5. If running PHP 5, use the following instead:

    
    

    If you wanted to use OOP:

    connect_errno){
    die("Could not connect: " . $link->connect_error);
    }
    echo 'Connected successfully';
    // $link->query("SELECT * FROM xyz WHERE 1") as opposed to mysqli_query($link, "SELECT * ...");
    $link->close();
    ?>
Viewing 2 reply threads
  • You must be logged in to reply to this topic.