Jump to content

Invite System, PHP, MSQL


YOUAREtehSCENE

Recommended Posts

I`m trying to code an invite system based.

 

Would like to have it so that it's all in php of course

So where it would be like this

 

http://i33.tinypic.com/t5g3ty.jpg

 

But, I would like it so that the person who gets the invite opens up there email

and there would be a link to there invite to be activated and it would have like a long random confirmation code

 

I was planning on using this

http://www.phpeasystep.com/phptu/24.html

please check this out. wondering if this would be easier, or useful

But, I want to have control in the database tables, to add more invites for people

 

On one of the DB tables, I'd like to have

the person who invited, the invited

 

Then maybe on the same table, or second I'd like to have a box where I can add invites

 

invite.php

invite/

 

So people can have on there sidebar

 

Invite History

Pending Invites

Invite A Friend

and all of those will be drop down menus

 

here's the random key code

 

<?
function createRandomCode($num){
//create an array of characters
$rand_array = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",1,2,3,4,5,6,7,8,9);

//initialize the string
$random_code = '';

//loop through the number that you wanted
for($i=0;$i<$num;$i++){
     $rand_num = rand(0,sizeof($rand_array));
     $random_code .= $rand_array[$rand_num];
}

return $random_code;

}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.