Yeah, here is the php code that I used.
This is the code that we add in the popup (as html)
<form action="link-to-php-file" method="POST" accept-charset="utf-8">
<table>
<tr>
<td>
<label for="name">Name</label>
<input type="text" name="name"/>
</td>
<td>
<label for="email">Email</label>
<input type="text" name="email"/>
</td>
<td>
<input type="submit" name="Subscribe" value="Subscribe"/>
</td>
<tr>
</table></form>
And here is the php file that you got to create and add it on the server.
<?php
//--- You need to set these ---//
$your_installation_url = 'https://www.your-website.com'; //Your Sendy installation (without the trailing slash)
$list = 'list-id'; //Can be retrieved from "View all lists" page
$success_url = 'https://www.your-website.com.com'; //URL user will be redirected to if successfully subscribed
$fail_url = 'https://www.your-website.com'; //URL user will be redirected to if subscribing fails
//---------------------------------------------------------------------------//
//POST variables
$name = $_POST['name'];
$email = $_POST['email'];
$boolean = 'true';
//session_start();
$_SESSION['ref'] = $_SERVER['REQUEST_URI'];
echo($ref);
//Check fields
if($name=='' || $email=='')
{
echo 'Please fill in all fields.';
exit;
}
//Subscribe
$postdata = http_build_query(
array(
'name' => $name,
'email' => $email,
'list' => $list,
'boolean' => 'true'
)
);
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context = stream_context_create($opts);
$result = file_get_contents($your_installation_url.'/subscribe', false, $context);
//check result and redirect
if($result)
{
header("Location: $ref");
}
else
//header("Location: $fail_url");
?>
Hope this helps.