Question: 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>

```

Answer: 
you can post data to another server by writing the true url if your url was ok the post data must be passed but if you checked your url and it's true but you still have a problem you can use api calls to do that by

```
header('Content-Type: application/json');
$data = json_decode(file_get_contents("php://input"));
header("Content-Type: application/json");
$name = $data->name;
$to = "yourmail@mail.com";
$message = $name . "hiii";
$subject = "test mail";
mail($to, $message, $subject);

```

by doing this you can make a api call with curl to do the mail function and pass the information from the server by curl request i hope you find this answer helpful and if `mail()` function didn't worked for you or gave you an error you can try phpmailer if you have any questions you can comment and i will answer them
appspot.com has been the host to a lot of fishing attacks. It is likely blocked as a safety issue.