-3

我对 PHP 不是很熟悉,所以我不知道该怎么做。

$error["sess_msg"] = "This email has already been used. Select another one or use Forgot Password tool." ;  

如何在此 php 代码中创建链接“忘记密码”,以便用户可以单击它并重定向到正确的页面以重置密码,因为标准 html 在这里不起作用。

谢谢

4

4 回答 4

3
$error["sess_msg"] = 'This email has already been used. Select another one or use <a href="#">Forgot Password tool.</a>' ;
于 2013-05-06T11:54:13.893 回答
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;

这样,您可以将链接部分放在某个变量中以进行配置。

于 2013-05-06T11:54:01.127 回答
1

改成这样:

$error["sess_msg"] = "This email has already been used. Select another one or use <a href='YOUR_URL' />Forgot Password tool</a>." ;
于 2013-05-06T11:54:24.223 回答
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." ;
于 2013-05-06T11:55:14.440 回答