If I were doing this, I'd generate a random link code with PHP's
rand() function along with their entry in the pending info table. 
Then, using PHP's mail() function, mail them a link to one file such
as confirm.php with the random code as a GET var.  Then, when they
click the link, have the confirm.php page parse the GET var and
retrieve / update their information.  You might want to consider
having some sort of confirmation code for them to type in as well as
just clicking a link could be fabricated by anybody (read: the
millions of spambots crawling the web).  However, if they have to
click your link with a random code as well as enter in a random code
that you email them at the same time, you won't have any problem with
spambots.  

You can generate alphanumeric randoms by putting your rand() call in a
FOR loop and concatenate all the results together.  Simple example:
numbers 0-9 map to 1-10 and letters a-z map to 11-36.  If you put the
zero in the ten's spot, 1-9 will map to 1-9 and 0 will map to 10, then
 a will be 11 and z will be 36.  Add mixed case if you want.  If you
want a 10 digit number, just make 10 calls to rand() between 1 and 36
and concatenate each mapped character into your code.







--- In [email protected], Ajay Singh <[EMAIL PROTECTED]> wrote:
>
> 
> 
> hello every one
>  i have a problem. i have to create a referal page via which a user
can refer site to their frends.when he click on link a pge wll open
inwhich he can enter 10 friends name & email ids.when he wll click on
invite button,then i have to make entry in database wth status
'pending' and send a mail to each person;s id which consist a
activation link.when person click on tht link page wll open and in
database status wll change as 'confirm'
>    
>  the problem is i m not able to create tht link and mail it to person.
>  if anyone have any idea then plzzz help me.
>    
>    
>    
>  
> 
> 
>  
> ---------------------------------
> Get your email and see which of your friends are online - Right on
the  new Yahoo.com
> 
> [Non-text portions of this message have been removed]
>





The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php_mysql/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to