Thread: Connect to DB

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    5
    Rep Power
    0

    Connect to DB


    Hi everyone i am new in Php field and want some help please anyone can send me a code to connect PHP to DB.
    i am waiting your reply
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,617
    Rep Power
    595
    Search engines are your friend.

    PHP PDO Tutorial
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    if you wanna learn PHP, you need to start writing your own code. You don't learn from merely copying and pasting somebody else's stuff. Apart from that, this is not a "code for free" service. We can help you with concrete questions, but we don't just hand out solutions.

    So I guess it's time for you to get familiar with good PHP resources. Unfortunately, a lot of the PHP tutorials you'll find via Google are outdated and sometimes plain garbage (especially the infamous "w3schools"). So it's usually a good idea to search for specific functionalities. In this case, what you want is "PHP PDO" (as gw1500se already said). Look it up. The PHP manual also has a complete reference with concrete examples of how to use it.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    5
    Rep Power
    0
    hi Jacques thanks for your kind suggestion. It is right that i should need to familiar with the codes. And i am starting to work on this codes and understand their terms.

IMN logo majestic logo threadwatch logo seochat tools logo