Forum Moderators: coopster
<input type="text" name="default_options[referral_name]" value="'.$_COOKIE["referral"].'" size="30" tabindex="', $context['tabindex']++, '" /> .$_COOKIE["referral"]. is where it gets read, now when the cookie doesnt exist it gets the undefined index (cause the cookie doesnt exist), but the cookie is only made when someone goes to ref=username, so people who go to register straight away dont get the cookie and thus on them when it tries to .$_COOKIE["referral"]. it gives the undefined index, i need a way to put into the code above with value="' some type of isset command or something
<input type="text" name="default_options[referral_name]" value="'.( (isset($_COOKIE["referral"]) )? $_COOKIE["referral"] : '' ).'" size="30" tabindex="', $context['tabindex']++, '" />