Solved

Create User With Password

Posted on 2004-08-18
7
254 Views
Last Modified: 2010-05-19
hello,
 What im trying to do is when a user goes to my page info.php
 and he inputs his information I want the script to create
 him an account

------------------------------------
            <table width="197">
              <tr>
                <td width="251" align="right">Name:</td>
                <td ALIGN="left" width="152">
                  <input type="text" name="Name" size="20"> </span>
                </td>
              </tr>
              <tr>
                <td width="251" align="right">ID</td>
                <td ALIGN="left" width="152">
                  <input type="text" name="ID" size="20"> </td>
              </tr>
              <tr>
                <td width="251" align="right">Email:</td>
                <td ALIGN="left" width="152">
                  <input type="text" name="Email" size="20">
                </td>
              </tr>
              <tr>
                <td width="251" align="right">Password:</td>
                <td ALIGN="left" width="152">
                  <input type="text" name="Password" size="20"> </td>
              </tr>
                </table>
------------------------------------

thanks
0
Comment
Question by:Xtry
7 Comments
 
LVL 3

Expert Comment

by:newaira
ID: 11832282
So what do you want us to do?
0
 
LVL 3

Expert Comment

by:newaira
ID: 11832305
... do you have mySQL or some database on the back end or not? Have you done anything?
0
 

Author Comment

by:Xtry
ID: 11832614
yes I do have MySQL,
I want my friends to be able to make their accounts.
then my account will be admin and im the only one who
can write in the (notes) section so they can login and see
each one of their respeftive information something like
-friend01: monday and wednesday 6 hours
-friend02: monday and wednesday 8 hours
so they can login and see how many hours they have to work,
I dont want others to see someone's notes.
ps. im the only one who can write on the notes.
thanks
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Expert Comment

by:newaira
ID: 11834745
So what is the problem, the fact that you don't know where/how to begin, or that you want someone to do it for you?

First create a table in the database with 4 fields. Something along the lines of ID, username, password, email.
Then create a new row every time someone creates a new account.
etc.
0
 
LVL 7

Accepted Solution

by:
NetExpert earned 200 total points
ID: 11837788
I suggest you start with a groupware script (dotproject etc, search on google) that use PHP to manage a group (just as you wish. Then look at some parts of the code and you'll learn faster. Then when you get fluent, you can start your own. It will be hard at first, but you'll got something instantly, and you'll learn the structure.

For your own problem, here's my ideas of how to start.
- Draw a database structure with mysql. See which field will you need. Let's say userid (it's easier to control with userid), username, userpassword, useremail, userright, etc. Then put them in a user table. Then see what else you may need (noteid, note_content, note_owner, etc), put them in another table (for eg, note). So you'll have a database (put a name for it).
- Draw a connection structure: how will you connect between database and php, which function will be use. Write some function to update/edit userinformation and note content.
- Draw a structure to get user information: which HTML form will be used, which variable will be parsed from HTML to PHP, which function will process those data.
- Draw a structure to display note, blah blah blah

Hope that you got the ideas. Unless you have something on hand, don't start with the html form.
0
 
LVL 3

Assisted Solution

by:Boris Aranovich
Boris Aranovich earned 100 total points
ID: 11839366
As NetExpert said, you have to plan the application first.
Then, when you start coding, you have to never forget taking security into account.
Basically, after you add a user to the DB, all the functions will have to either receive the user_id, or take the user_id from the Cookie or Session, and take it into consideration in any of the actions or DB Queryies they do.
0
 
LVL 8

Assisted Solution

by:GEM100
GEM100 earned 200 total points
ID: 11841208
Xtry,

Here are couple of good tutorials about doing what you need:
http://www.evolt.org/article/PHP_Login_Script_with_Remember_Me_Feature/17/60265/
http://www.free2code.net/tutorials/programming/php/4/phplogin.php

Here is more information about user authentication with PHP, including tutorials and sample codes:
http://www.tutorialized.com/tutorials/PHP/User-Authentication/1

And here is how you can always easily find such information of the internet:
http://www.google.com/search?hl=en&ie=UTF-8&q=php+tutorial+login+script


G-Luck!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now