2012-07-31 107 views
0

我想发送某些电子邮件给我的客户,并在这些电子邮件中提供了一个链接(类似激活电子邮件来激活您的帐户),当用户点击该链接时,他们被引导到一个页面在我的网站上,该页面有一个电子邮件输入框。自动填充电子邮件输入框在php

我想,当他们点击链接并重定向到我的网站上输入字段会自动填写的电子邮件从这里用户点击了链接。(注意:用户不需要我的网站上进行登录)

使用PHP

什么办法可以做到这一点,即时谢谢

回答

1

也可以通过在URL如Correspodant ID一些数据,然后查找待自动填充ID数据库...

或者你也可以可以合并URL中的电子邮件ID并将其放入电子邮件中,然后当用户将该URL作为URL时,相应的电子邮件ID将作为查询字符串的一部分,您可以读取并放入文本框。

let's use your example 
http://www.example.com/example.php?id=USEREMAIL 

you could access the value of the variable id in the $_GET array like so 

echo $_GET['USEREMAIL']; 

this would output "UserEmail". It is common to pull these into a local variable such as 

$myid = $_GET['USEREMAIL']; 

this would be the some syntax for any var in your url, take this example 

http://www.example.com/[email protected]&start=40&section=mysupercat 

$myid = $_GET['AutoFillEmail']; 
$start = $_GET['start']; 
$section = $_GET['section']; 

希望你能理解

+1

想想''urlencode()来''荷兰国际集团您的联系 – thedom 2012-07-31 07:30:08

+0

感谢TheDom您指出.. – 2012-07-31 07:31:47

+0

哥们,但IM发送的链接,大宗用户,用于循环和附加的电子邮件到各个环节都不会被认为是理想的良好做法。感谢无论如何欣赏 – 2012-07-31 07:33:43