3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by Viced
0

Yes, it was infact in exactly that thread i first posted my question but it was moved to a new thread (this one). I did not found the answer there though, hehe

0

this is like a referral system if I'm not mistaken... to generate unique links to every user you has to give them their unique links by appending their id on the links, like http://www.yoursite.com/registration.php?id=13. through that after a successful registration you may be a able to identify who will be able to get the point. hope that helps ^_^

0

thanks mate! i acculy just got the unique link-generation to work perfectly!

this is the code:

$confirmcode = md5($_SESSION['myusername']);
$link ="registration.php?user=$username&conf=$confirmcode";


echo "<a href=\"$link\" target=\"mainFrame\">http://www.mysite.com/$link</a>";

The link generated looks like this:

www.mysite.com/registration.php?user=&conf=*************************

By some odd reason, when i tried to make the md5 encrytion more complex with a code looking like below, it generated the same hash for every user... very odd i must say

$confirmcode = md5($_SESSION['myusername'] + "sc00b13sc00b13d00");

By the way,, i was going to include the password in the encryption but seince a member can change his password i suppose that this would mean that a link generated before a passwordchange wouldnt work after the passwordchange. am i right?

anyway, how does the code look so far?

Edited by Viced: n/a

0

solved the trix with the more complex encryption just now, so just ignore that :)

right now it looks like this instead:

$salt="sc00b13sc00b13d00";
$confirmcode = sha1($salt.md5($_SESSION['myusername']));
$link ="registration.php?user=$username&conf=$confirmcode";
echo "<a href=\"$link\" target=\"mainFrame\">http://www.mysite.com/$link</a>";

Edited by Viced: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.