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.

SOLVED Using MariaDB to store website preferences

Discussion in 'Database Discussions' started by Spork Schivago, Dec 12, 2016.

  1. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    462
    Likes Received:
    52
    Trophy Points:
    28
    Location:
    corning, ny
    cPanel Access Level:
    Root Administrator
    Hi.

    I want to write my website, but I want to have a user control panel where people can change the theme a little. Maybe change the colours and, after I get the forums setup, how they're displayed. I also wanted to store profile information, like usernames, passwords, email addresses, etc.

    I was thinking I could use MariaDB to store all this information, and then write my website using a language like PHP to pull in the data each time a person visits.

    I wanted to know if anyone had any experience with doing what I want to do. Is there a better way to accomplish what I want to accomplish? Is the database the way to go or should I be storing this information in a file or something on my server and just having PHP read in the various data?

    Some of the concerns is maybe with the database, it'll be really slow if I have something like 20 users. The server would have to work to pull that data every time. I recently started reading about SQL Injection, and that scares me a little, because I have no experience in this area yet. I'm sure my code will have issues.

    Do you guys have any suggestions for me?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Database storage is fairly common, especially if you want individual preferences stored for the users. You may receive more user-feedback to this type of topic at a website such as StackOverflow where more code-related discussions occur.

    Thanks!
     
  3. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    462
    Likes Received:
    52
    Trophy Points:
    28
    Location:
    corning, ny
    cPanel Access Level:
    Root Administrator
    Okay. I might check out that webdeveloper.com site as well. That looks promising.

    Thank you.
     
    cPanelMichael likes this.
Loading...

Share This Page