# Invite Code

**URL:** <https://www.phphelp.com/t/invite-code/13010>\
**Category:** Beginners - Learning PHP\
**Created:** [April 2, 2011, 4:01pm UTC](https://www.phphelp.com/t/invite-code/13010 "2011-04-02T16:01:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![larrywcc](https://www.phphelp.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@larrywcc](https://www.phphelp.com/u/larrywcc)\
**Post date:** [April 2, 2011, 4:01pm UTC](https://www.phphelp.com/t/invite-code/13010/1 "2011-04-02T16:01:46Z")

</div>

I tried working on a simple script that I thought was simple but now I am starting over from scratch.

Already running a program but I do not want people to register on my site unless I invite them to do so. I would like to add into the program that

1. I send a person a invite code
2. They can enter the code then they will be able to register.
3. The invite code can only be used once.  
The invite code I can enter via backend mysql so do not have to work with a admin area. As I can do that part as I used four fields invite code, date ( It was used ), tries ( If someone else used the code), active (0-active or 1- Already Used)  
I do not know much about php but enough to get though except this simple task. Like I said I am starting from new as the code was more messed up. Just had a hard time with a person entering the code search the DB to check if they can make it pass.  
Thanks for any HELP!
