<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="php.css">
<title>Document</title>
</head>
<body>
<div>
<!-- <form action="php1.php" method ="post"> -->
<!-- <p>Імя:</p><input type="text" name = "Fname">
</br>
<p>Прізвище:</p><input type="text" name = "Lname">
</br> -->
<!-- <p>Років:</p><input type="number" name = "Age">
<input id="php"type ="submit" value ="Add to Data" name ="search">Go!</input>
</form>
</div> -->
<!-- <button id="goP">GOOOOOO</button> -->
<!-- <form action="php1.php" method="post" onsubmit="return false">
</form> -->
<input type="submit" id="goP" name="nameOf" value="Go">
<?php
$a = json_decode(file_get_contents('php://input'));
if($_SERVER['REQUEST_METHOD'] == 'POST') {
var_dump($a);
}
?>
</div>
<!-- <script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script> -->
<script src="php.js"></script>
</body>
</html>
Я вас понял,нужно было разместить в HTML,и я вижу что в консоле оно выводит инфу,но почему на самой странице оно не показывает её?