Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Database connectivity

Discussion in 'Database Discussion' 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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice