I am trying follow this tutorial: https://html.form.guide/email-form/php-form-to-email/ to deploy a simple php script to google App Engine. I want to load the form from localhost and post to the app engine link. When I do, the $_POST
is empty. Is this an issue when posting from another server/localhost to an app-engine hosted service?
Code:
app.yaml:
runtime: php55
api_version: 1
threadsafe: true
handlers:
- url: .*
script: formemailer.php
php script:
<?php
if(!isset($_POST['submit']))
{
echo "error; you need to submit the form!";
}
?>
Form:
<form method="post" action="https://<url>.appspot.com/formemailer.php">
<p>
<label for='name'>Enter Name: </label><br>
<input type="text" name="name">
</p>
<input type="submit" name="submit" value="submit" />
</form>