• Breaking News

    Monday, 13 February 2017

    PHP connecting mysql database with your site



    <?php
    $servername = "localhost"; 
    $username = "root";   //use your name
    $password = "";  //put if you have
    $dbname = "ditcool";   //your database name

    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }


    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel