在查询字符串中传递变量

时间:2012-12-22 20:42:42

标签: php email

我想在查询字符串中传递$ Email,看起来像这样

header("Location:index.php?state=sent&Email=$Email");
$Email = urlencode("$urlencode");
$urlencode = $row['Email'];

我之前已经从我的数据库中定义了$ row

这将收到它

$Email = $_GET['Email'];
echo "<p style='color:white;margin-bottom:10%; font-size:17px;' align='center'> Your email is: $Email</p>"; 

但由于某种原因,它不会发送带有查询字符串的电子邮件

1 个答案:

答案 0 :(得分:1)

你订单错了。 应该是:

$urlencode = $row['Email'];
$Email = urlencode($urlencode);
header("Location:index.php?state=sent&Email=$Email");
相关问题