Important alert: (current site time 7/15/2013 10:16:26 AM EDT)
 

winzip icon

Account Creation System

Email
Submitted on: 2/3/2001 3:58:23 AM
By: Chris Flanigan  
Level: Intermediate
User Rating: By 23 Users
Compatibility: PHP 4.0
Views: 62279
 
     *** UPDATED *** I've rewritten the Account Creation System to be a little more efficient, and in turn made it a little more complicated. I decided to do this due to the interest in the small project. It also now conforms to new PHP 4.0 standards. This code allows for the use of a MySQL database to create and manage a list of users as well as have email confirmation using a random #. All the user has to do is fill out the required form, they're added into the database and they will not be allowed to log in until they confirm using the special URL that they're emailed.
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
// for :Account Creation System
//**************************************
Chris Flanigan
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 7 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
8/24/2002 8:21:53 PM80 SpitFire 08

dude....... put in a file to create the table's in mySQL to make it easier
(If this comment was disrespectful, please report it.)

 
11/14/2002 9:20:38 PM

Hi I am getting these errors could you
help me out. ERROR: Access denied for user: 'windowsc@localhost' to database 'screensc_screenshops' UPDATE account SET confirmed = '0' WHERE random = 468402 Congratulations, your account has successfully been confirmed. You may now log in.

Also

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/windowsc/public_html/create.php3 on line 38
ERROR: Query was empty
New Account Added

I am pretty new at this but I am catching on. Your help would be appreciated

Thanks Again
(If this comment was disrespectful, please report it.)

 
11/14/2002 9:22:39 PM

Hi I am getting some errors.

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/windowsc/public_html/create.php3 on line 38
ERROR: Query was empty
New Account Added
Also
ERROR: Access denied for user: 'windowsc@localhost' to database 'screensc_screenshops' UPDATE account SET confirmed = '0' WHERE random = 468402 Congratulations, your account has successfully been confirmed. You may now log in.
Can you give me a litle guidence.

Thanks
(If this comment was disrespectful, please report it.)

 
12/4/2002 5:21:28 PM

Verry Nice, I Like it, code is verry well done, and is commented verry Well, Thank you!
(If this comment was disrespectful, please report it.)

 
12/9/2002 1:43:37 AMChris Flanigan

As for the person getting errors, it would seem that the person running your server has not granted you UPDATE privileges to your database or, the user/password combination is incorrect.

As for everyone else, I've rewritten all of this in light of the interest it's taken on.. and I'm much more satisfied with the quality of the rewrite. Any problems? E-mail me.
(If this comment was disrespectful, please report it.)

 
4/12/2003 11:35:20 AMtom_anu007

Hello,
You've put up a gr8 code.Well I don't know Php but was looking for some halp.I'm trying to put up a site! I wanted u create a registration script for me.I have the design ready just need the code.I've notting much to offer maybe I'll be able to help u in near future in some way!
thx.
(If this comment was disrespectful, please report it.)

 
5/30/2003 6:11:29 PM

Itīs a great code, i donīt know about PHP, a know a few from C, so i get it, but in this code you use a function named mail(), but my smtp server needs authentication, i have a php script on my own, that i use to send mails thruoght my site, iīve been tryin' to adapt it to yours but i can get it done, have you got an alternative only for part that you send the e-mail confirmation where you have to send the user and password for a valid acount on my SMTP server?

(If this comment was disrespectful, please report it.)

 
7/31/2003 5:22:49 PMShatners

creates accounts fine, but how do you go about making pages where only logged in people can access?
(If this comment was disrespectful, please report it.)

 
2/28/2004 12:29:00 AM

Chris

Looks pretty good. I am designing a system of my own and will probably use some of your code.

Was wondering however, how would you go about managing the entries in your database where the user chooses not to confirm the creation of their new account when they receive the email.
(If this comment was disrespectful, please report it.)

 
2/28/2004 12:32:18 AM

The last post was submitted by me but it didn't include my account to allow me to be contacted. This post should.
(If this comment was disrespectful, please report it.)

 
3/28/2004 2:22:07 PMKASESNIK

Hi Chris, I like this code and have a project to do like this. Are you available for some work? Will pay, so email me kasesnik@hotmail.com
(If this comment was disrespectful, please report it.)

 
2/10/2005 12:45:59 PM

I noticed that in the functions.inc.php there is a minor bug:


# Setup SQL statement, update account to show that user has confirmed.
$SQL =
(If this comment was disrespectful, please report it.)

 
2/10/2005 12:48:10 PM

Ok, my last post was truncated. The problem is with the confirm SQL statement:

WHERE random = '$confirm'";

Should be:

WHERE random = '$random'";

Otherwise the table isnt updated and user is not confirmed, or random set to '0'.

Other than that, great code, thanks!


(If this comment was disrespectful, please report it.)

 
5/4/2005 9:12:31 AM

Heita, great code
I'm doing a support system for a high school with a web page connected to a database, can you by any chance help?

here's my e-mail address: brityrm@webmail.co.za

Thanx in advance
(If this comment was disrespectful, please report it.)

 
8/15/2006 10:52:32 AMAtaur Rahman

Thanks
(If this comment was disrespectful, please report it.)

 
11/24/2006 5:24:00 AMlanz

cool

(If this comment was disrespectful, please report it.)

 
6/12/2007 6:33:58 AMjumea

Verry Nice, I Like it, code is verry well done
(If this comment was disrespectful, please report it.)

 
1/24/2008 2:06:33 PMrenu

Hi there! Thank you very much for sharing coding with us, especially me as a beginner.

I would like to seeked your help on how to change password coding when we have create a user account.

In a way, when for example, if I have input my username and password, how do I change to anew password?

Thank you.

(If this comment was disrespectful, please report it.)

 
2/25/2008 11:21:28 AM

bravo..well done
(If this comment was disrespectful, please report it.)

 
3/2/2009 10:55:02 AMDario

hello everyone, I apologize for my bad English. I am an Italian boy. I downloaded the code and having no added sends e-mail confirmation to login! I have to set something? I need other files to run the form? I only changed files with my data. I can not understand. Thanks
(If this comment was disrespectful, please report it.)

 
6/9/2009 1:03:16 AMmichael rejas

Good i hope you have other more system like this. I need put in my website your system. But i hope you help me. Please Visit my website: www.cyberhuweb.com
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.