Results 1 to 8 of 8

Thread: PHP User Login/Register

  1. #1
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default PHP User Login/Register

    Hey everyone! I'm probably famous for asking the most demanding and confusing posts and questions ever. *WOHOO!* I think this one will be the top... Anyways:
    I want to have a PHP only user login/register script. So that a user can login and upload a file or if they don't have an account they can register and upload a file. Don't worry i have the upload form... but I just need the script so i can do this...
    By the way did I mention that I can't use MYSQL... *because my hosting service has the WORST mysql because isn't very friendly and it has a limit to how much data can be transmitted...


    THANKS TO ALL THAT HELP
    any questions or comments are accepted *and answers*

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by Rockonmetal View Post
    Hey everyone! I'm probably famous for asking the most demanding and confusing posts and questions ever. *WOHOO!* I think this one will be the top... Anyways:
    I want to have a PHP only user login/register script. So that a user can login and upload a file or if they don't have an account they can register and upload a file. Don't worry i have the upload form... but I just need the script so i can do this...
    Didn't you post this question before? I think in your last request like this I pointed you towards http://php-mysql-tutorial.com. That should have everything you need to know about how to accomplish this.

    By the way did I mention that I can't use MYSQL... *because my hosting service has the WORST mysql because isn't very friendly and it has a limit to how much data can be transmitted...
    Um...what?!? Not friendly, and limit on data transfer? I have never heard of a hosting server doing this. If you need, I can host your MySQL database and give you access through phpmyadmin. Let me know if you want this.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Quote Originally Posted by thetestingsite View Post
    Um...what?!? Not friendly, and limit on data transfer? I have never heard of a hosting server doing this. If you need, I can host your MySQL database and give you access through phpmyadmin. Let me know if you want this. Hope this helps.
    That would make feel really bad man like sorta in the way that I'm using you. I just can't let my self do it... Unless this is a super bad idea which would get me in jail I think i'm sticking to what I'm doing...
    Oh BTW my localhost mysql database is not starting thats why i can't plus my hosting service is not so friendly. *i will switch when I get the chance at the end of the contract thingy...*

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Rockonmetal View Post
    That would make feel really bad man like sorta in the way that I'm using you. I just can't let my self do it...
    he is offering you free hosting, and its not illegal. why not take it?

    Oh BTW my localhost mysql database is not starting
    have you tried doing a remote reboot? most hosting services offer that to clients. and if your server is so bad, why not switch to a new one?

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Oh BTW my localhost mysql database is not starting
    have you tried doing a remote reboot? most hosting services offer that to clients. and if your server is so bad, why not switch to a new one?
    I believe he is referring to his local machine with a WAMP install. Could be wrong though.
    Last edited by thetestingsite; 09-17-2007 at 08:07 PM.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Quote Originally Posted by boogyman View Post
    he is offering you free hosting, and its not illegal. why not take it?
    Me and new things often break first time, maybe later if I'm having problems but not now because I could end up hurting his site or something like that that... *trust me I can do it without even meaning to do it...*

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    This is one of the most basic things you can do with MySQL. Alternatively you can use flat files-- .txt files, for example.

    Create a folder called "accounts" and inside it store username.txt for each user. Inside that, store the password and any other info you need in an easily accessible format, like CSV, etc.
    [Make sure that the username is a valid filename!!!-- strip out any weird characters, make it required to be lowercase, etc.]

    file_get_contents() and fopen(), fwrite(), and fclose() should be most of what you need for this.

    Look up some tutorials on google (there are lots).

    You won't find any really basic user account scripts, though you'll find a lot embedded in other things (like forums), though you have no need for something that complex.

    Aside from writing it for you, the best help we can give you is to point you to a tutorial.
    http://php-mysql-tutorial.com has a specific tutorial (as I remember) of doing user logins/accounts.
    If you don't want to use mysql, use what I said above for flat files, and you may still get some insight from that tutorial on how to deal with the php parts.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    This script might be useful to you: http://www.myphpscripts.net/?sid=7

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •