The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Database connectivity

Discussion in 'Database Discussions' started by Edge007, Dec 3, 2011.

  1. Edge007

    Edge007 Registered

    Dec 3, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner
    Please some body help me how i can connect my data base???
    Please rply to my basic queries.
    1. In which folder we have to place our connecting scripts (php)??
    2. how connection can be made? suppose we have database (A), table name(B) and in that we have two column C and D. then how we can fetch that values to UI. Please help.

    I am new designer. so ,need to know.

  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You can place your connecting script in any file inside public_html directory usually. The location of the connection script doesn't really matter.

    I'm not certain I understand the portion about how the connection would be made. You can find many examples online for PHP MySQL connection scripts. I would suggest searching using Google for examples.

    Once you've gotten an example script, please feel free to post any issues you have with the connection. You will need to create a database in cPanel > MySQL Databases area, create a MySQL user in that same area, then add that user to the database in that same area.

Share This Page