Simple website with user accounts

Discussion in 'Web Design and Development' started by floh, Nov 22, 2012.

  1. macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #1
    Hey everyone!

    So, I want to create a simple website, and I have never done this (well, yes, but very basic and a long time ago). The website is supposed to have the following features:

    - People can create user names (captcha?) and log in with them.
    - They can submit some data (just a number and maybe the submission date)
    - They can view a graph of their own numbers and an average of everybody else's
    - They can log out

    Now these features are very basic and don't need to be fancy. The number of users will probably stay below 100. Not knowing anything, I would have gone about it with PHP and a mySQL database, but I have never really used either. I have a lot of coding experience in C and some in Python and am generally not afraid of computers and editors. I own Rapidweaver (because it was included in a software bundle once) but have never used it.

    My questions to you are:

    1. Are PHP and mySQL the way to do this? Is there a better or easier way?

    2. What would you use to draw and show graphs of some data on the website?

    3. Would you recommend doing this with Rapidweaver? Can Rapidweaver easily manage a database, logins and a graph, or would I have to manually code the PHP and mySQL part anyways? Or would you recommend to use Rapidweaver for a layout and then edit the resulting pages by hand?

    4. Do you (by chance) have any great tipps where I can get examples or pre-coded site sketches like this? It seems to me like many people would want this (a site with accounts), and I don't want to re-program the wheel. ;) This is supposed to be a "could you just quickly code this"-project... as always...

    Thanks, and I hope I didn't insult you all with my complete newbie questions.

    Floh
     
  2. macrumors 6502a

    Joined:
    Apr 1, 2007
    #2
  3. thread starter macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #3
  4. macrumors regular

    Joined:
    Aug 21, 2011
    Location:
    Stockholm Sweden
    #4
    Wordpress

    Suggestion.
    Look at the wordpress system. It solves a number of the things more or less directly (creating users, logging in) and there is a lot of ready plugins available that might already solve what you are planning to do. It will as well allow you to host the site without cost.

    // Gunnar
     
  5. thread starter macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #5
    Thanks, Gunnar. I know the wordpress system (my institute uses it for the webpage we distribute our simulation software through) and it is very convenient.

    However, I see three small hickups with that:

    1. It does not allow a user to easily create his own account, does it? The way I got to know it, accounts can only be created by an admin user. I would like to avoid that. But I could be wrong here.

    2. The database connectivity isn't great. Users in wordpress are supposed to be users that can or can't view certain pages or that have editing capabilities. Basically setting the "page rights" like for users in Unix filesystems. The users are not supposed to be entries in a database, with editable data points associated with their account. I would probably have to hack a lot to get this working and could as well go with PHP directly.

    3. Free webspace is great, but I already have that, because I work at a university. :)

    Thanks anyways, and I may actually be wrong about these points.
     
  6. macrumors regular

    rdas7

    Joined:
    Nov 17, 2002
    Location:
    London, England
    #6
    I'm in precisely the same situation —*extensive experience in front-end code, but little hands-on with server-side (beyond accessing APIs that I usually have a hand in architecting, but not coding).

    Look into PaaS and SaaS solutions such as Parse.com —*might be just what you're looking for! There are several other similar services.
     
  7. macrumors regular

    Joined:
    Aug 21, 2011
    Location:
    Stockholm Sweden
    #7
    Hi.
    I am in no way an expert, have only dabbled a bit on the corners with wordpress. I find it to be one (of probably many) shortcuts to solve things that otherwise would take a lot of my (not bugfree) code.
    1. There are several plugins allowing users to register themselves with more or less security checks. Check this one as an example (buddypress). http://testbp.org
    2. Agree on that part. But I believe that if you have already verified the user and has his name in a PHP variable (wordpress does that) it would be easy to access the MySql database to store stuff.

    Anyway, beeing a lazy programmer, I personally try to steal as much as possible.
    // Gunnar
     
  8. macrumors newbie

    Joined:
    Oct 5, 2011
    #8
    Users can create an account themselves with Wordpress. You don't even have to install any plugins; it's native to Wordpress. It's a checkbox in the settings of the Wordpress site, called "anyone can register". Just check that box and you're good to go.
     
  9. thread starter macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #9
    Thanks everyone, not just you!

    I'll consider using Wordpress in the future, it seems like a great option for many tasks.

    Since I ended up planning to do a lot of database stuff anyways for this page, I just learned CSS, PHP, mySQL and Javascript (using flot for my plots) in one day and did the whole thing from scratch in another day (there goes my weekend). Yeah, these languages are amazingly simple, it's just the communication between them that took some effort and getting used to for me. So, if you stumble across this thread and you ever need to do something like this, I'll gladly send you my project. It's not perfect, but it seems to do what I wanted. :)

    Thanks again for all the fast and kind replies.
     
  10. macrumors newbie

    Joined:
    Jul 9, 2013
    #10
    Floh: Any chance you could send me the project? I'm looking for something similar and am getting ready to start a weekend of fun.
     
  11. thread starter macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #11
    Sure, I just sent you a PM for exchange information.

    In case anyone is interested, this is what the final project looked like:
    http://zefrank.fahrenbergers.de/

    It's nothing special, but I thought it would complete this thread. You'll have to create an account though to see the Javascript parts of it...
     
  12. macrumors newbie

    Joined:
    Jul 19, 2013
    #12
    Hi Floh: I'm trying to learn PHP and this would be perfect. Can you share your code?

    Thanks,
    Hari
     
  13. thread starter macrumors 6502

    Joined:
    Nov 28, 2011
    Location:
    Stuttgart, Germany
    #13
    Alright, I'll share it publicly. Just didn't want to spam the forum... maybe it helps someone.

    Here is the code:
    http://downloads.fahrenbergers.de/weight_loss_tracker.zip

    And here is the eMail I wrote the first guy who asked for it, for some explanations and help:

     
  14. macrumors newbie

    Joined:
    Jul 19, 2013
    #14
    Thanks! That was very helpful!
     

Share This Page