我对PHP不太熟悉所以我不知道该怎么做。
$error["sess_msg"] = "This email has already been used. Select another one or use Forgot Password tool." ;
如何在此php代码中创建“Forgot Password”链接,以便用户可以点击它并重定向到正确的页面以重置密码,因为标准html在这里不起作用。
由于
答案 0 :(得分:3)
$error["sess_msg"] = 'This email has already been used. Select another one or use <a href="#">Forgot Password tool.</a>' ;
答案 1 :(得分:2)
$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;
通过这种方式,您可以将链接部分放在某个变量中进行配置。
答案 2 :(得分:1)
更改为:
$error["sess_msg"] = "This email has already been used. Select another one or use <a href='YOUR_URL' />Forgot Password tool</a>." ;
答案 3 :(得分:0)
使用以下代码:
$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." ;