Jump to content

Creating an invite system php style


YOUAREtehSCENE

Recommended Posts

I'd like to create or have someone help me, or have someone create me, a php based invite system

that I can have people invite there friends to my site i run.

 

I'd like it to be like a drop down type menu or if someone clicks on

"INVITES" / "INVITE FRIENDS"

that a drop down box will appear

 

User Name:

Email:

Password:

 

So, when they enter there friends info in, that person will be sent an email with an activation link to be clicked on.

Also, would like to give people x amount of invites, only I can give them invites depending on what's going on, so it won't be so crazy. Also, would like to have i so I can see who's inviting who.

 

Thanks

-Dave

AIM - youaretehscene

Link to comment
Share on other sites

they will fill in there friends info that they want to get on the site.

They complete the info the email is sent off to there inbox. they will get a message

http://www.phpeasystep.com/imgs/confirmation_mail.gif

they click on the link and I'll set up a page saying account successful kthnx or something, now there account is all set to be used. Now, I just need to find a way to find out how to give them invite's thru the database, and how to find out a way to write, a script or something, so that If i click on there user name, it will bring you to "USERSONLINE" like it does now, that gives me there IPs, but it will state they they invited this person and so on and so forth, would like to generate a point system, for people so they can upload something, adn use the cash to be traded into for invites or something!

 

 

This is the code so far, got the boxes up, now i gotta finish the submit button, and reset button.

<script type="text/javascript">

<!--

function showhide(targetID) {

//change target element mode

var elementmode = document.getElementById(targetID).style;

elementmode.display = (!elementmode.display) ? 'none' : '';

}

 

function changetext(changee,oldText,newText) {

//changes text in source element

var elementToChange = document.getElementById(changee);

elementToChange.innerHTML = (elementToChange.innerHTML == oldText) ? newText : oldText;

}

 

function workforchange(targetID,sourceID,oldContent,newContent) {

showhide(targetID);

changetext(sourceID,oldContent,newContent);

}

 

// Cruft note: The content of "oldContent," the third argument of the

// workforchange() function, must match the existing content of the changer text.

 

// -->

</script>

<a href="javascript:workforchange('p2','changer2','Invite','Close');" id='changer2'>Invite</a>

<span id='p2' style='display:none'><br />

Username:

<input type="text" name="user" />

Password:

<input type="text" name="user" />

E-Mail:

<input type="text" name="user" />

<input type="submit" value="Submit" />

</form> </span>

 

//////// ///////// INVITESHACK

if (get_user_class() >= UC_POWER_USER) { if (get_user_class ()> = UC_POWER_USER) (

$res9 = mysql_query("SELECT username FROM users WHERE id = $user[invitedby]"); $ res9 = mysql_query ( "SELECT username FROM users WHERE id = $ user [invitedby]");

$arr9 = mysql_fetch_array($res9); $ arr9 = mysql_fetch_array ($ res9);

$invby = $arr9["username"]; $ invby = $ arr9 [ "username"];

if ($user["invitedby"] >= 1) if ($ user [ "invitedby"]> = 1)

print("<tr><td class=tableb>Invited von</td><td class=tablea align=left><a href=/userdetails.php?id=$user[invitedby]>$invby</a></td></tr>\n"); print ( "<tr> <td class=tableb> Invited by </ td> <td class=tablea ALIGN=LEFT> <a href=/userdetails.php?id=$user[invitedby]> $ invby </ a> </ td> </ tr> \ n ");

print("<tr><td class=tableb>Invites</td><td class=tablea align=left>Du hast noch: <a href=/invite.php><b><font color=red>$user[invites]</font></b></a> Invites frei.</td></tr>\n"); print ( "<tr> <td class=tableb> Invites </ td> <td class=tablea ALIGN=LEFT> You do not have <a href=/invite.php> <b> <font color=red> $ user [invites] </ font> </ b> </ a> free Invites. </ td> </ tr> \ n ");

} )

////////INVITESHACK ///////// //////// ///////// INVITESHACK

 

Wondering if this will work, to show who invited who onto the blog

 

ALTER TABLE users ADD invites int (10) unsigned NOT NULL DEFAULT'4 ';

ALTER TABLE users ADD invitedby  int(10) unsigned NOT NULL DEFAULT '1'; ALTER TABLE users ADD invitedby int (10) unsigned NOT NULL DEFAULT'1 ';

 

$ GLOBALS [ "MAX_INVITES"] = 3700;

 

WONDERING IF I COULD USE THIS CODE TO CREATE my point system for people who post things on my site, they can trade in there points for invites.

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.