mailchimp auto pre filled url encoding

时间:2015-08-06 22:35:07

标签: php html mailchimp subscription url-encoding

如何使用电子邮件预先填写我的订阅论坛。例如,如果某人想要输入他的“电子邮件”并点击“senden”按钮进行订阅,他的“电子邮件”应该已经存在于我的订阅论坛中。 down是来自网站的网址(针对嵌入式订阅论坛),此嵌入式窗口小部件和订阅论坛的代码。

邮件黑猩猩订阅论坛网址:http://boooo.us7.list-manage.com/subscribe?u=2e01f07a729f6f76a41a34ca5&id=66efb8b1bb

网址网址:www.boooo.com

代码:

<!-- Begin MailChimp Signup Form -->

<div id="mc_embed_signup">
    <form action="//eepurl.com/-xxxx" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="">
        <div id="mc_embed_signup_scroll">
            <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder=" E-Mail Adresse" required="" /> 
            <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->

            <div style="position: absolute; left: -5000px;">
                <input type="text" name="xxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxx" tabindex="-1" value="" />
            </div>

            <div class="clear">
                <input type="submit" value="senden" name="senden" id="mc-embedded-subscribe" class="button" />
            </div>
        </div>
    </form>
</div>
<!--End mc_embed_signup-->

感谢您的帮助。

2 个答案:

答案 0 :(得分:0)

您可以在后端表单上使用$ _POST变量。

第一种形式:

<form action="subscription.php" method="post">
    <input type="text" name="first_email">
    <input type="submit">
</form>

订阅表格:

<form action="mailchimp.php">
    <input type="text" name="email" value="<?php echo $_POST['first_email']; ?>"
....

欲了解更多信息: http://php.net/manual/en/reserved.variables.post.php

答案 1 :(得分:0)

如果您只想转到该mailchimp注册页面并预填充电子邮件,则此链接似乎有效:

https://boooo.us7.list-manage.com/subscribe?u=2e01f07a729f6f76a41a34ca5&id=66efb8b1bb&MERGE0=foobar@foobar.com

如果您需要表格,请尝试

<!-- Mailchimp Signup Form -->

<form 
  action="https://boooo.us7.list-manage.com/subscribe?u=2e01f07a729f6f76a41a34ca5&id=66efb8b1bb" 
  method="post" target="_blank">
  <input type="email" name="MERGE0" placeholder="Your e-mail">
  <input type="submit" value="Subscribe">
</form>

<!--End  Mailchimp Signup Form -->