Web Hosting Talk







View Full Version : how do you create "refered by" feature in registration scirpt?


latheesan
07-14-2005, 03:09 PM
How do make a script that tells you, who refered the new members who are joining my site?

my idea was to have another extra text box like this as the last field on the registration form:

<input type="text" name="referer" size="25">

and then when the registration details are "posted" to another validation script called "register.php"

inside that script, i was gonna include this function/code

$referer=$_POST['referer'];

then, when the registeration is finally validated and user info is being stored, i was gonna make the script send the data from the string $referer

now will this work? any possible suggestion for my idea anyone?

keithslater
07-14-2005, 04:15 PM
Anyway you can pass around information would work. You can store the referer in POST, sessions, or cookies if you wanted.