I am trying to create a login script but the email that gets sent to the user when they register doesn't send a valid link to click on. How do I get it to work?
Here's the code:
//sending sign-up e-mail (validation notice)
$val_key=$email.time();
$val_key=md5($val_key);
$sql_query="insert into validate (email,password,val_key) values ('$email','$password','$val_key')";
sql_execute($sql_query,'');
$data="<a href='$main_url/index.php?mode=join&act=val&val_key=$val_key&inv_id=$inv_id'>Verify Email</a>";
messages($email,'0',$data);
//showing a congratulation page
$sql_query="update stats set day_sgns=day_sgns+1,week_sgns=week_sgns+1,month_sgns=month_sgns+1";
sql_execute($sql_query,'');
if($package_amt=='0.00') complete_screen(0);
else {
global $main_url;
$link=$main_url."/index.php?mode=paypal&pack=$pack&mem_id=$mem->maxid";
show_screen($link);
}
}
}
My suspicion is that its somewhere in the bolded part of the code but I could be wrong. What is supposed to go in the validation address, or if someone can just explain to me what is going on when it validates an email.
thx!