1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

php and database

Discussion in 'PHP' started by hardik soni, Jul 30, 2010.

  1. hardik soni

    hardik soni New Member

    Hello everyone,

    I am new in PHP. I want to know how to establish connection between PHP and any database, Please guide me if you can...

    In Anticipation....
  2. shabbir

    shabbir Administrator Staff Member

  3. hardik soni

    hardik soni New Member

    All right nice info from that site
    but can anybody let me know something in your own language for the same topic ?

  4. johnny.dacu

    johnny.dacu New Member

    well... is simple. to estabish a mysql connection use:
    to select a database:
    to perform a mysql query:
    mysql_query("query string");
  5. ManzZup

    ManzZup New Member

    First you need to make a database from your admin panel. (hope you know to do that)

    Then the following script would give the basic concept of connecting:


    $password "your_db_password";
    $database "your_database_name";
    $host "your_host_address";

    $db_handle mysql_connect($host$username$password);
    $db_found mysql_select_db($database$db_handle);

    "Auuraah You sucessfully connected!";
    "ahh Try Again!!";

Share This Page