How would be better ?

by 13 replies
15
I want to make a website, on what I need to store 1mb of data for each registered user. The data from that 1mb file will be used on all the pages of the website (line by line with php). I found a host, the cheapest host from hostgator, they give unlimited bandwidth and space. My question is that it`s better to store that 1mb of date (time dates, information about the user) in a file and place it in different folders for each user or to put that information on a mysql database? Another thing is that I need to rewrite the entire file if I want to change one of the lines.... How can solve this via Javascript or with a better php snippet ?
#programming #php #solve
  • It very much depends what the data is and what it's for but you'll almost certainly be better off storing it in a database of some description. Most notably because it handles stuff like rewriting the entire file when you update individual entries etc.
  • The problem is that where I can found a cheap host with unlimited mysql database size...
    • [2] replies
    • I run most of my sites on Dreamhost. They offer a lot of data storage.
      PM me if you want some discount codes.
    • Use mysql, a lot of hosting has unlimited mysql, a2 hosting, hostgator, bluehost ...

      Files get messy, if your saving anything use a database.
      • [1] reply
  • im around 200 pounds and the only type of dirt bike i can afford right now is a 1989 yz 80. i want to stard riding like just go to a track and go off some jumps and just mess around on.
  • numbers, passwords....
  • 1MB for each user is the equivalent of storing a copy of Moby Dick for each user. Are you sure you actually have 1MB of data for each user?
  • Do you know a host that offers unlimited hosting for 1 year? I heard it somewhere but Im not actually sure of it.
  • You might want to also be wary of resource limits; if you are processing 1mb of data for each user logged in you may find you run into resource problems processing it all, depending how many users your site has or will have over time.

    Imb of data per user is an awful lot, do you really need that much? Are you storing binary data, images or something like that?
  • I have found a host with unlimited space and bandwidth: http://www.hostgator.com/shared.shtml - The Hatchling Plan
    • [1] reply
    • I guess there are plenty of web hosting companies those offer really great stuff with DB. Anyway are you looking for web hosting in US or are you currently hosting your website in any of Web hosting based in the US?

Next Topics on Trending Feed

  • 15

    I want to make a website, on what I need to store 1mb of data for each registered user. The data from that 1mb file will be used on all the pages of the website (line by line with php). I found a host, the cheapest host from hostgator, they give unlimited bandwidth and space. My question is that it`s better to store that 1mb of date (time dates, information about the user) in a file and place it in different folders for each user or to put that information on a mysql database? Another thing is that I need to rewrite the entire file if I want to change one of the lines.... How can solve this via Javascript or with a better php snippet ?