I’m following this tutorial to build the user registration system (https://www.positronx.io/build-php-mysql-login-and-user-authentication-system)
I have successfully posted the user registration info to the SQL database but I’m stuck in the user verification part.
I tried to click the link in the verification email but turns out it returned an error err_connection_refused
. I am wondering if I need to change the localhost in the href to my domain name?
Also, I’m not sure what is php-user-authentication
, I couldn’t find that folder in my WordPress cpanel.
Thank you guys for your help and I hope it’s not a silly question.
if($sqlQuery) {
$msg = 'Click on the activation link to verify your email. <br><br>
<a href="http://localhost:8888/php-user-authentication/user_verificaiton.php?token='.$token.'"> Click here to verify email</a>';
}
2
Answers
Mail veryfication is really easy
I would recommend you to use site name instead of port.
Like : http://localhost/domain/php-user-authentication/user_verificaiton.php?token=$token
Above url will simply lead you to your localhost site, exact on that site.
then simple:
user_verification.php is the file where you get $token available
Just changing the following line
to