Answers for "php print post data"

PHP
2

var_dump _post php

<?php print_r($_POST); ?>
Posted by: Guest on April-12-2020
1

get post data in php javascript

if($json = json_decode(file_get_contents("php://input"), true)) {
    $data = $json;
} else {
    $data = $_POST;
}
Posted by: Guest on June-05-2021
0

php if $_POST

if( isset($_POST['fromPerson']) )
{
     $fromPerson = '+from%3A'.$_POST['fromPerson'];
     echo $fromPerson;
}

//Note: This resolves as true even if all $_POST values are empty strings
if (!empty($_POST))
{
    // handle post data
    $fromPerson = '+from%3A'.$_POST['fromPerson'];
    echo $fromPerson;
}
Posted by: Guest on January-18-2021

Browse Popular Code Answers by Language