Advertisement

03.03.2006 at 01:44PM PST, ID: 21760068
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.0

500 Big Ones! How do I Setup a simple PHP Password and Username Script to communicate with mySQL?

Asked by Donavan_usa in PHP Scripting Language

Tags: , , ,

Here it is - I hope you can answer this easily.  I would like to setup the following sequence using PHP and mySQL

1) The user first selects to create a 'New Account' (no worries on the script for this step (html), I simply need help on the PHP side)

2) After the user selects 'New Account' they receive the following message:

                                      Please first select a Username to see if it is available

Here is the first PHP script - I would like the script to go back to the mySQL DB and see if any of the 'username' fields have the same variable as the one they just entered ($username).  The reason is simple, before a user sets up a New Account with a new username, I would like to check first to see if the username is already in use.

3) As the PHP script is checking the mySQL database to see if this unique username already exists, it either does one of two events:
                                   A) If the username is already in use, the PHP script does something like the following:

                                   if (username exists) then tell the header to goto {header("Location: exists.htm"); exit;}

                                   B) If the username is available, the PHP script does something like the following:

                                   if (username available) then tell the header to goto {header("Location: available.htm"); exit;}

4) If the username is available, I will send the user to a new screen (available.htm) where they will input the following fields:

                  Username

                  First Name
                  Last Name
                  Passsword
                  Title
                  Email Adress
                  Phone Number
                  Address
                 
5) After these fields are entered, I would like the PHP script to open up mySQL again and create these fields under the unique username they just entered in the previous step (I would like the PHP script setup to allow multiple users to create new accounts under new usernames).

FINAL STEPS

6) Upon loging into the site on future visits, I would like the PHP script to now check the username and password to see if they match and are valid.  If they are valid do A and if they are not do B below:

                                   A) if (valid) then tell the header to goto {header("Location: valid.htm"); exit;}

                                   B) if (not valid) then tell the header to goto {header("Location: not_valid.htm"); exit;}

7) Once a user has setup a new account under a unique username, I would like a PHP script to allow the user to 'edit' their profile, thus the script would search for the unique username in the mySQL DB and send back all the variables (please see #4 above) associated with this username for editing.  Once the changes are made to these variables, the PHP script would then send back the updates to mySQL (like a new updated email address or title, etc).

Thanks for the help and the points are yours!!!






Start Free Trial
[+][-]03.03.2006 at 02:27PM PST, ID: 16099187

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 02:30PM PST, ID: 16099211

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP Scripting Language
Tags: password, php, already, simple
Sign Up Now!
Solution Provided By: rockmansattic
Participating Experts: 4
Solution Grade: A
 
 
[+][-]03.03.2006 at 02:43PM PST, ID: 16099328

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.03.2006 at 03:00PM PST, ID: 16099448

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 03:15PM PST, ID: 16099567

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 03:46PM PST, ID: 16099757

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 03:59PM PST, ID: 16099858

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 04:11PM PST, ID: 16099948

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 04:24PM PST, ID: 16100085

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 04:26PM PST, ID: 16100159

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 04:33PM PST, ID: 16100297

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 04:52PM PST, ID: 16100433

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 05:15PM PST, ID: 16100600

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 05:55PM PST, ID: 16100831

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.03.2006 at 06:28PM PST, ID: 16100974

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2006 at 05:26PM PST, ID: 16211940

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.19.2006 at 11:03AM PST, ID: 16230680

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy