如何获取输入的电子邮件地址并在FormToEmail.php脚本中使用它? [英] How to grab input email address and use it in FormToEmail.php script?
问题描述
我正在使用FormToEmail.php免费脚本从用户输入他们的电子邮件和收件人的电子邮件的页面发送一些表单数据,并且显然是一些文本作为消息。
I am using FormToEmail.php free script to send some form data from a page where user enters their email and recipient's email and obviously some text as message.
FormToEmail.php有一个地方我插入我想要提交的内容的电子邮件。
In FormToEmail.php there is a place where I insert the email which I would like the content to be submitted.
我需要在FormToEmail.php文件中动态设置作为收件人电子邮件输入的电子邮件,以便将内容发送到收件人的电子邮件。我该怎么做?
I need to set the email which is entered as "recipient's" email dynamically in FormToEmail.php file so that the content will get emailed to recipient's email. How do I do that?
推荐答案
该脚本的评论中有一个文字:
There is a text in comments of that script:
Step 2:
Enter your email address.
评论阻止后有一行:
$my_email = "delete these words and put the email address only in here between the quotes";
假设你有编码地址而不是删除这些....。你应该简单地用以下方式替换该行:
Suppose you have harcoded address instead of "delete these ....". You should simply replace that line with:
$my_email = !empty($_REQUEST['recepient_email_field_name']) ? $_REQUEST['recepient_email_field_name'] : "default email address";
其中 recepient_email_field_name
是一个字段的名称用户应该输入他的电子邮件和默认电子邮件地址的表单应该被您当前使用的电子邮件替换。
Where recepient_email_field_name
is name of a field on a form where user should enter his email and default email address should be replaced with that email you have there currently.
这篇关于如何获取输入的电子邮件地址并在FormToEmail.php脚本中使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!