Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1

    Default how to connect database using php


    How to connect database using php program? mga expert i need ur advice..

  2. #2
    Up na imong Apache, PHP and MySql setup?
    I think it's better to read a book and follow examples in there, this is so basic! If you have problems with what you have made, come back here and ask for help about it, with the configurations, codes, errors, etc...

    -
    no one can help you if you can't help yourself. hihih

  3. #3
    google it..... or go to php documentations....

  4. #4
    bro. musta?


    <?php
    //start session : this is optional
    session_start();

    $host="localhost"; //host server
    $user="root"; //username of the server
    $pass=""; //password for the server

    //connect to your database
    $db = mysql_pconnect($host,$user,$pass) or die("Can't Connect to Database");

    //Select database
    mysql_select_db("database_name");


    ?>

    hope it helps.

    FREE job post at cebujobline.com

  5. #5
    Quote Originally Posted by sanggano_boy View Post
    bro. musta?


    <?php
    //start session : this is optional
    session_start();

    $host="localhost"; //host server
    $user="root"; //username of the server
    $pass=""; //password for the server

    //connect to your database
    $db = mysql_pconnect($host,$user,$pass) or die("Can't Connect to Database");

    //Select database
    mysql_select_db("database_name");


    ?>

    hope it helps.

    FREE job post at cebujobline.com
    unsa nga database system compatible ani? ms access ba or ibm ba....


    and how to call insert and select,save,delete and update sa php..

  6. #6
    CORRECTIONS:

    session_start() and database connection ARE NOT RELATED.

    session_start() <-- are only used for maintaining user/browser temporary information... e.g. Login info.

  7. #7
    Quote Originally Posted by skeptic_rob View Post
    unsa nga database system compatible ani? ms access ba or ibm ba....


    and how to call insert and select,save,delete and update sa php..

    if mysql ka then do this mysql_connect()
    if mssql ka then do this mssql_connect()

    take note:

    if mssql gamit nimo then imu pa e activate ang mssql extentions makita sa PHP.INI

    if Windows user ka then better download WAMP dali ra ang setup.

  8. #8
    Quote Originally Posted by dodie View Post
    CORRECTIONS:

    session_start() and database connection ARE NOT RELATED.

    session_start() <-- are only used for maintaining user/browser temporary information... e.g. Login info.
    yes, I know gikan mn gud na sa akong site, hehehe.
    Thanks

  9. #9
    Quote Originally Posted by skeptic_rob View Post
    unsa nga database system compatible ani? ms access ba or ibm ba....


    and how to call insert and select,save,delete and update sa php..

    mysql_query("INSERT INTO tblname(field1,field2...) VALUES ('".$_POST['frmtxtvalue1']."','".$_POST['frmtxtvalue1']."'...)"); --> gamit lang ka SQL statement same pud sa select, update, or delete



    Free job posting & resume search @ cebujobline.com

  10. #10
    dli pa ko kamao sa mysql query pero u gave me the hint aw hinay2x lang ko self study ani..

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. how to connect internet using PDA phone
    By dismarked in forum Networking & Internet
    Replies: 2
    Last Post: 02-04-2009, 09:59 PM
  2. How to connect database
    By ingkiang in forum Programming
    Replies: 3
    Last Post: 07-15-2008, 05:14 PM
  3. Canon Camcorder Optura10 - How to connect it to my computer using USB?
    By Chipmunk888 in forum Gizmos & Gadgets (Old)
    Replies: 1
    Last Post: 02-24-2007, 07:54 PM
  4. Replies: 4
    Last Post: 01-20-2007, 01:00 AM
  5. HOW TO CONNECT SQL SERVER USING SQL AUTHENTICATION
    By edshark in forum Software & Games (Old)
    Replies: 13
    Last Post: 09-02-2005, 04:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top