[eluser]mact1079[/eluser]
I have a simple invite link that opens up the user's default email program to send friends a randomly generated invite code in order to create an account on an invitation only app. I decided to do this instead of creating a form so that the user can use their own contact list vs inputting emails.
Code:
<a href="mailto:?subject=Invitatione&body=Link http://domain.com/aTsg72">Invite</a>
How can I go about creating the random invite code when the user clicks the button AND then still open up the default email client with mailto: or perhaps some other function? I think I'm ok with generating the random code with a button click but I'm not sure how to continue the mailto: functionality.
I could create the invite code on page load and then just plug it into the link I suppose but I don't want to create invite codes that fill the DB without the user taking the action.
Any help much appreciated!! Your newest Codeigniter fan!