Jump to content

Archived

This topic is now archived and is closed to further replies.

richwininc

How can i do make invitation only site?

Recommended Posts

I have a membership website and I want to make it invitation only....  How can I accomplish this?

Share this post


Link to post
Share on other sites
I want to make it to where you can get into the site or register without a invitation from another member. When you type the url in i want to go to a page where it just explains the site(which i already made) a place for invitation code input, and a place to log in (which i got this part)

Share this post


Link to post
Share on other sites
you eman Like it has done GOOGLE MAIL ??
U cannot register without INVITATION ?

Share this post


Link to post
Share on other sites
Email users invitations... only allow people to signup who have recieved invitations.

Simple. What part don't you understand?

Share this post


Link to post
Share on other sites
ok I have a affiliate program that i have started with some celebrity speakers and I want to make it to where when they do a e-mail promotion the affiliate has a invitation code in their, and when the customer clicks comes to the site they have to enter that invitation code to get in.

Like when google analytics came out you have to enter a certain code to get in and its a different code for everyone.  I want to make like to where each affiliate has a invite code they can use.

I dont know if that makes since or not...

Share this post


Link to post
Share on other sites
[code]
<?
if (empty($_GET[user_id])) { $user_id = $_POST[user_id]; } else $user_id = $_GET[user_id];
if (empty($_GET[code])) { $code = $_POST[code]; } else $code = $_GET[code];

if (!empty($user_id) && !empty($code) ) {
$q = mysql_query("SELECT * FROM confirm WHERE user_id = '$user_id' AND code = '$code' LIMIT 1");
$z = mysql_fetch_array($q);

if (mysql_num_rows($q) == 1) {

$user_level = 0;
$username = $z[username];
$password = $z[password];
$email = $z[email];

$insert = mysql_query("INSERT INTO users (user_id,user_level,username,password,email)
VALUES ('".$user_id."','".$user_level."','".$username."','".$password."','".$email."') ");

$del =  mysql_query("DELETE FROM confirm WHERE user_id = '$user_id' LIMIT 1");

if ($insert && $del) {

msg_it ("Congratulation!","Your validation successfully done. Now you can login with your username and password!");

} else echo mysql_error();



} else {
msg_it("Error","Invalid USER_ID or CONFIRMATION CODE");
}


} else {

echo '<form method="POST" action="?fid=html&page=confirm">

<table width="600" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="2" align="left" bgcolor="#FFA029"><strong>Validation</strong></td>
      </tr>
   

  <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td width="100"><strong>User_ID:</strong></td>
        <td><input name="user_id" type="text" class="reg_form"  maxlength="3"></td>
      </tr>
      <tr>
        <td><strong>CODE:</strong></td>
        <td><input name="code" type="text" class="reg_form" maxlength="80"></td>
      </tr>
      <tr>
  <td>&nbsp;</td>
        <td><input type="image" src="images/buttons/validate.png" /></td>
      </tr>
    </table>


</form>';

}

?>
[/code][/code][/code][/code]

Share this post


Link to post
Share on other sites
[quote]I dont know if that makes since or not...[/quote]
Yeah... it makes sense, the bit I dont understand is where your stuck. Have you got any code? Do you know php?

Share this post


Link to post
Share on other sites
You have no choice but to have the affiliates put that in the database.  You just have a database full of all the accepted codes, have your affiliates feed you the code, or whoever, when they get it enter it into a database, then only the codes in the database, will allow access.

Share this post


Link to post
Share on other sites
No i dont know php at all only html.....  oh ok so do i need to create a new database aside from the one i have and put the codes in there?  Thanks for the form... Do i just input that in the page i'm building and load the codes in the database and send the codes to the affiliates i want to have it?

Thanks for the help thus far

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.