انت تستخدم اخر اصدار شكرا لك

  • More
  • أخر التعليقات

    Connect php with mysql


    This is how you make the connection file to mysql database ( look for the example of the use here: 

    EXAMPLE

     <?php

        function OpenCon()
        {
            $dbhost = "localhost";
            $dbuser = "username";
            $dbpass = "password";
            $db = "dbName";

            $conn = new mysqli($dbhost$dbuser$dbpass,$db) or 
                    die("Connect failed: %s\n"$conn -> error);
            return $conn;
        }
        function CloseCon($conn)
        {
            $conn -> close();
        }
    ?>

    No comments :

    Post a Comment