我创建了一个表单。用户将提交表单并收到包含该链接的电子邮件。点击链接后,我必须在URL上显示Id。你能帮我解决这个问题吗?
futures.get(Boolean.FALSE)
我正在获取URL
的输出if (isset($result->num_rows) > 0) {
while($row = $result->fetch_assoc()) {
$User_id = $row['User_id'];
}}
echo $User_id;// I am able to display id here
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<a href='http://localhost/in/abc.php?user_id='" .$User_id. ">Click here</a>
</body>
</html>
";
答案 0 :(得分:2)
我刚刚完成了:
echo $User_id;// I am able to display id here
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<a href='http://localhost/in/abc.php?user_id='$User_id1'>Click here</a>
</body>
</html>
";
您不需要连结?user_id='$User_id1'>
答案 1 :(得分:1)
你需要修复你正在使用的两个变量的代码,你也缺少引用`
<a href='http://localhost/in/abc.php?user_id='" .$User_id1. ">Click here</a>
要
<a href='http://localhost/in/abc.php?user_id=" .$User_id."'>Click here</a>
应该是,
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<a href='http://localhost/in/abc.php?user_id=".$User_id."'>Click here</a>
</body>
</html>";