• The Facebook Platform

Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2010
    Location
    Lahore, Pakistan
    Age
    25
    Posts
    3,818
    Points
    6,772.51
    Rep Power
    10000

    movie 12 - MySQL Database Connectivity with PHP - Tutorial in Urdu

    In this tutorial we will teach you how to connect to MySQL database with php in a efficient way..

    Youtube Video



    Dailymotion Video









    PHP CODE



    PHP Code:
    <?php
    $host 
    "localhost";
    $db_user "root";
    $db_pass "";
    $db_name "learning";

    $db mysql_connect($host$db_user$db_pass);

    if(
    $db) {
        
    $select_db mysql_select_db($db_name);
        
        if(
    $select_db) {
            
    //echo "Database connected! & Selected DB ".$db_name;
        
    }
        else {
        
        echo 
    mysql_error();
        }
        
        
    }
    else {
        
        echo 
    mysql_error();
    }

    ?>
    Last edited by Їийоcёйт Кїllєґ; 03-13-2014 at 05:00 AM.
    Find Me On Social Networks

    Facebook | Twitter | Google+



 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •