1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Connect to SQL server using php

Discussion in 'Hire a Freelancer' started by IotaInsanity, May 25, 2017.

  1. IotaInsanity

    IotaInsanity Junior Member

    Joined:
    Oct 24, 2013
    Messages:
    116
    Likes Received:
    14
    Can someone help me figure out how to connect to sql server via php. send me a skype request, iotainsanity, or ping me here. WIlling to pay decent amount.
     
  2. jhustlin

    jhustlin BANNED BANNED

    Joined:
    Jul 27, 2014
    Messages:
    29
    Likes Received:
    2
    Gender:
    Male
    <?php
    $server = "ip_of_host_or_localhost";
    $database = "name_of_database";
    $username = "name_of_user";
    $password = "password_of_user";

    $mysqlConnection = mysql_connect($server, $username, $password);
    if (!$mysqlConnection)
    {
    echo "mysql server is wacked, please check logs.";
    }
    else
    {
    mysql_select_db($database, $mysqlConnection);
    echo "sql connection successful";
    }
     
    • Thanks Thanks x 1
  3. IotaInsanity

    IotaInsanity Junior Member

    Joined:
    Oct 24, 2013
    Messages:
    116
    Likes Received:
    14
    yeah, thats mysql. i need sql.
     
  4. jhustlin

    jhustlin BANNED BANNED

    Joined:
    Jul 27, 2014
    Messages:
    29
    Likes Received:
    2
    Gender:
    Male
    skype me, i can do this for you!
     
  5. jhustlin

    jhustlin BANNED BANNED

    Joined:
    Jul 27, 2014
    Messages:
    29
    Likes Received:
    2
    Gender:
    Male
    skype: ADSQ4D