1. Home
  2. Knowledge Base
  4. How Can I Customize My Thank You Page With My Subscriber’s Data?

With Imnica Mail, you can collect different data from your subscribers via your opt-in form with the help of custom fields. With some basic PHP knowhow, you can then use this data on your thank you page to customize the page.

When someone signs up via that form, they are redirected to a custom Thank You page (this can be set in your List Settings)

To customize your thank you page with the data, first save it with a .php extension (example: thankyou.php). You can use a program like Notepad (on Windows) or TextWrangler (on Mac) for this purpose.

Now, to customize the page and insert data we’ve just collected, use this code:


$ImnicaMailXml = simplexml_load_string(rawurldecode($_GET[‘XMLReturn’]));

$SubscriberID = $ImnicaMailXml->Subscriber->SubscriberID;
$EmailAddress = $ImnicaMailXml->Subscriber->EmailAddress;
$FirstName = $ImnicaMailXml->Subscriber->CustomField3600;
$LastName = $ImnicaMailXml->Subscriber->CustomField3601;

Note that $EmailAddress is a variable, which stores data from the form. Similarly, $LastName is a variable that stores data from CustomField3601 in the form and so on. Please refer to your form’s HTML code to know the exact field name you would need to use.

Finally, you can display the data in the variables like this:


echo “Subcriber ID: {$SubscriberID}<br>\n”;
echo “Email Address: {$EmailAddress}<br>\n”;
echo “First Name: {$FirstName}<br>\n”;
echo “Last Name: {$LastName}<br>\n”;



So, you could use this data to address the subscriber with their first name by inserting the code like this:

Hi <?php echo $FirstName; ?>,

Thank you for signing up to MyTestList. An confirmation email has been sent to <?php echo $EmailAddress; ?>. Please click the link to confirm your subscription.


Save your Thank You page as a PHP file (.php) and upload it to your server. Make sure the custom redirect in your list settings point to this PHP file and you’re done!

Was this article helpful?

Related Articles