I'm trying to push the $POST_[values] from my form to my Mailchimp list of contacts, but the only two values I can get to be pushed are "email" and "status" (which is "subscribed").
I read all the documentation and I can't make it work with the provided merge fields.
HTML
<div class="input-box">
<span>First Name</span>
<input type="text" name="FNAME" value="FNAME" tabindex="1">
</div>
<div class="input-box">
<span>Last Name</span>
<input type="text" name="LNAME" value="LNAME" tabindex="2">
</div>
<div class="input-box">
<span>Email*</span>
<input type="email" name="email2" tabindex="3" required>
</div>
<div class="input-box">
<span>Company*</span>
<input type="text" tabindex="4" name="MMERGE9" value="MMERGE9" required>
</div>
<input id="submit-download" type="submit" name="submit2" tabindex="5" disabled></input>
PHP
include('./mailchimp/MailChimp.php');
$MailChimp = new MailChimp('XXXX');
$list_id = 'XXX';
$email = $_POST['email2'];
$MERGE9 = $_POST['MMERGE9'];
$result = $MailChimp->post("lists/$list_id/members", [
'email_address' => $email,
'status' => 'subscribed',
'MERGE9' => $MERGE9,
I tried all variations provided by Mailchimp: MERGE9, MMERGE9, |MERGE9|
I use this library: https://github.com/drewm/mailchimp-api
I also tried to list the merge fields using the curl command but I can't get it to work: