I have a Gmail Sponsored Promotion Ad which has a form. The form collects basic data like name and email, then redirects the user to a page where they can download a pdf file and sends the form data to my email via a php file (submit.php). However, I can't host submit.php in the same server as the form, Google doesn't allow any other files other than index.html and the images, and no script either, only vanilla HTML. All I can do is link to an external action.
This works when the submit.php file is hosted on the same server as the form, but not when they are hosted in different servers - I don't get the email with the data from the form. Why is that? And what can I do to circumvent it? ps. I don't know any PHP
Form hosted in http://google.com/
<form action=" http://me.com/submit.php" method="post">
<input type='email' name='email'></input>
<input type='submit'></input>
</form>
submit.php hosted in http://me.com
<?php
$email = $_POST['email'];
$msg .= $email;
if (mail ($email_sender, $email_subject, nl2br($msg), $email_headers)){
?>
<script language= "JavaScript">
location.href="http://file.pdf"; </script>
?>