我对 PHP 不是很熟悉,所以我不知道该怎么做。
$error["sess_msg"] = "This email has already been used. Select another one or use Forgot Password tool." ;
如何在此 php 代码中创建链接“忘记密码”,以便用户可以单击它并重定向到正确的页面以重置密码,因为标准 html 在这里不起作用。
谢谢
$error["sess_msg"] = 'This email has already been used. Select another one or use <a href="#">Forgot Password tool.</a>' ;
$error["sess_msg"] = 'This email has already been used. Select another one or use Forgot <a href="forgotpass.php">Password tool.</a>';
为您清理它:
$pw_reset_tool = '<a href="forgotpass.php">Forgot Password tool.</a>';
$error["sess_msg"] = 'This email has already been used.';
$error["sess_msg"] .= 'Select another one or use ';
$error["sess_msg"] .= $pw_reset_tool;
这样,您可以将链接部分放在某个变量中以进行配置。
改成这样:
$error["sess_msg"] = "This email has already been used. Select another one or use <a href='YOUR_URL' />Forgot Password tool</a>." ;
使用以下代码:
$error["sess_msg"] = "This email has already been used. Select another one or use <a href='http://your_path_to_forgot_password_page'>Forgot Password</a> tool." ;