ampproject / ampproject/amphtml

Form method change from POST to GET

Open
#37,706 3 comments 0 reactions 0 assignees View on GitHub
Component: amp-form P3: When Possible Stale Type: Bug WG: components WG: runtime
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

AMP page with contact form:

``

As you can see, the method is set to POST. But on server side implementation (PHP), data from this form are sent via GET method.

```
echo $_SERVER['REQUEST_METHOD'];

GET
```

The form had previously worked without problems for several months. This changed few days ago out of nowhere (no previous code changes).

**I have no idea what causes the form method change.**

### Reproduction Steps

1. Live URL: https://sigi-sitom.cz/#kontakt
2. fill and send the contact form
3. at the end of the error message is returned $_SERVER['REQUEST_METHOD'];

### Relevant Logs

```shell
No console warnings about this issue.
```

### Browser(s) Affected

Chrome, Firefox, Safari, Edge

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

2202042210001

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the form submission at https://sigi-sitom.cz/#kontakt and inspect the request received by mail/send.php, including the reported AMP version 2202042210001. Compare the form's declared POST method with the actual request and determine whether the issue is reproducible; done means identifying a confirmed AMP-side cause or showing that the request reaches the server as POST.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.