This tutorial for other purpose?

Discussion in 'PHP' started by ziikutv, Jul 16, 2010.

  1. #1
    http://net.tutsplus.com/tutorials/php/how-to-create-a-phpmysql-powered-forum-from-scratch/

    This tutorial, is really helpful and does something really close to what I want to do guys.
    I want to make a script where a user can register, once they register, they will have their own subdomain on my website (user_name.example.com). They can use that URL to login.

    Once they login, they can create a "folder" and in that folder, they can store text files.
    When I say folder, it means a virtual folder (kind of like category). I will display those text files from those folders using PHP.


    So what my question is guys, how will my database tree differentiate from the database created on that tutorial. I know that I want to have this information private and it will only display to that specific user and not like a forum system. The folder will be different for each people too (because they can call it anything and it's only their folder with their own text files).


    Is creating their own subdomain and having a database the best idea, or I can do it a simpler way?

    This is my first application.

    Thanks.
     
    ziikutv, Jul 16, 2010 IP
  2. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #2
    Depends how big a scope your functionality is. If each user can upload,create tables. Then yes, a different database of each would be good. If it's just to store their username and password, one table is fine.
     
    Kaizoku, Jul 17, 2010 IP
  3. ziikutv

    ziikutv Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, what I want to do is have a user sign up..

    what ever they set their username as, will be their subdomanin. For example, if you sign-up on the site with the name Kaizoku (Pirate), then after the process is completed, a subdomain Kaizoku.example.com will be created.

    Also, a seperate database will be created (for that sub domain) containing password. If the password entered is correct, then you will enter.

    Once you enter, you will be brought to dashboard. In that you can create various directories and add text files in them.

    So if you add various folders this is what would happen.

    Kaizoku.example.com
    + Devil's Fruit
    - Gomu Gomu Fruit.txt
    - Fruit.txt


    But only you can view these files as they are on your domain and you can't enter the dashboard unless you have the password.


    So suggestions?

    Is the Subdomain idea better?
    Also.. is it useful to have database for the folders and txt files? or is it just better to have them make actual folder on that subdomain and store actual files rather than on the database.

    If they can store actual, I think there will be less database work required.. All i'll need is a database for username's and password right? and if the password is correct, they can access those files.


    Would you suggest that..

    or just one site where you signup and login. Once you login you can see your files/folders (everything will be database.. but I don't know how to only show files that match up with your user_id)


    oh, and thank you for replying
     
    ziikutv, Jul 17, 2010 IP