Start · Sprachen · PHP · Referenz · $_POST

$_POST

Superglobal

Form-Daten aus POST-Request (Content-Type <code>application/x-www-form-urlencoded</code> oder <code>multipart/form-data</code>).

seit PHP 4.1.0 Kategorie: http

Signatur

array $_POST

Beschreibung

Für JSON-Payloads: json_decode(file_get_contents('php://input'), true).

Rückgabewert

Typ
array
Beschreibung
Form-Daten.

Beispiele

JSON-Payload

<?php

$data = json_decode(file_get_contents('php://input'), true, flags: JSON_THROW_ON_ERROR);