简体   繁体   English

PHP中的自动填充电子邮件输入框

[英]Autofill email input box in php

i want to send certain emails to my clients and a link is provided in those emails(something like a activation email to active your account), when users click on that link they are directed to a page on my website , that page has a email input box. 我想向我的客户发送某些电子邮件,并在这些电子邮件中提供一个链接(类似于激活电子邮件以激活您的帐户),当用户单击该链接时,它们将定向到我网站上的某个页面,该页面上有一封电子邮件输入框。

I want that when they click on that link and get redirected to my site the input field should be automatically filled with email from where user has clicked the link.(note the user need not be signed in on my site) 我希望他们在单击该链接并重定向到我的网站时,应在用户单击链接的位置自动用电子邮件填充输入字段。(请注意,用户无需在我的网站上登录)

Any way i can do this , im using PHP 我可以用PHP的任何方式做到这一点

Thank you 谢谢

well you can pass some data in URL eg Correspodant ID and then look up the database which ID to be AUTOFilled... 好吧,您可以在URL中传递一些数据,例如Correspodant ID,然后在数据库中查找要自动填充的ID ...

Alternatively you can merge Email id in URL and put that in email and then when user HIT that URL the correspondant email ID will be part of the URL as query string that you can read and put in textbox. 或者,您可以将电子邮件ID合并到URL中,然后将其放入电子邮件中,然后当用户单击该URL时,对应的电子邮件ID将作为查询字符串包含在URL中,您可以阅读并放入文本框中。

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/example.php?AutoFillEmail=developerjigar@gmail.com&start=40&section=mysupercat

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

Hope you understand 希望你能理解

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM