Ok I'm new here and need help making the php part for a login and signup form. I know pieces of php but not much. I didn't know where to post this. I need help. Also do I need a MYSQL database?

    you need to post some code and ask specific questions, you can do it without a db, but a db is easier.

      well I don't know very much php. I can get to the variables but not past that.

        5 days later

        You must learn to walk before you can run little grasshopper!

        A worth while signup/login script is a substantial programming task.

        you need to learn some software development methodologies. ie: Work flow diagrams, Flow charts, pseudocode, etc, etc.

        If you can not describe a signup/login as simple logic statements, then you wont be able to code it.

        1. Request username/password

        2. If user clicks "submit" then check username/password againsts database

        3. If incorrect, then echo error message and goto 1

        4. If correct then goto main members page

        5. If the user requests to become a member then goto signin page (goto 6)

        6. Ask for user name, password and email

        7. Check database to see if username is already used

        8. If username is used, then echo error message and goto 6

        9. If password is not valid, then echo error message and goto 6

        10. Add username/password to database, but as a unvalidated email.

        11. Send a email validation request to email provided.

        12. Ask for user to validate their email by clicking on a link in the email.

        13. When a email validation request is received, validate the email, echo message and goto 1

        Now, this is only a start. After writing down the logic, you need to work out if it meets all your requirements.

        Maybe its too much? Maybe its not enough? Who knows.

        Once you work that out, you need to document technology spec.

        ie: Will you use Java? or, PHP? What database will you use? Or, will you use a simple text file? Or, use the file system to manage usernames?

        Most professional coders can do all this in their heads, which may make coding look easy, but the fact is, professional coders have been doing this stuff for years and live and breath logic.

        Universities will get you to document the above using some form of diagram.
        eg: I remember doing shneiderman diagrams.

        http://en.wikipedia.org/wiki/Nassi-Shneiderman_diagram

        From there they get you to convert the diagram to pseudocode.

        And then, and only then do you convert to PHP.

        Its unclear when technology selection comes into play. At Motorola we used a processed called: Decision Analysis Resolution (DAR)

        Its a fancy way of saying, lets all make some Powerpoint slides of each idea and have a bunch of meetings until we all get bored and decide to do the actuall work.

        Usually any DAR process ends with about 3-5 possible solutions and no-one to decide which is the better solution. So, you go by your gut feelings and just get the work done.

        Thats how you code. It takes years to get there, but its fun

          Write a Reply...