Avatar of PunkRokAdrenalin
PunkRokAdrenalin asked on

PHP Invite system.

Hey Experts,

   I'm in need of a invite system. The web page I am designing will have a password protection and the password will only be given out to a few select people. Once they are in the site I want them to be able to enter in three e-mail addresses to send invites that have randomly generated passwords which can only be used once... I have know idea how to do this and any pre-made stuff or templates. AND if it could be in PHP that would be good but it doesn't have to be.
PHPHTMLXML

Avatar of undefined
Last Comment
PunkRokAdrenalin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
cr4ck3rj4ck

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
mankowitz

That's a pretty tall order. I don't know of any premade stuff, but here is some pseudocode

if (!$_POST) {
show regular welcome page, with <INPUT TYPE=PASSWORD NAME=PASS>
}

else if($_POST['pass'] == "master password") {
allow user to select 3 emails
}

else
{ //check db for password
SELECT * FROM invites WHERE pw=$_POST['pass'];
if (mysql_num_rows($result)==0) {
// password is wrong .. try again}
else {
DELETE FROM invites WHERE $pw=$_POST['pass'];
}

function make_password() {
for ($d=0; $d<10; $d++) {
$pw .= chr(rand(1,26)+64);
}
INSERT INTO invites (pw) VALUES ('$pw')
return $pw;
}
ASKER
PunkRokAdrenalin

Hey guys,
Thank you so much for the help. The form is up and running and has successfully invited 800+ people!
ASKER
PunkRokAdrenalin

You rock thanks for the codes and help!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck