I am trying the fetch the form data. I dont know where the mistake is.
<html>
<head>
<title>Student</title>
</head>
<body>
<form name="std" action="insert/std_insert" method="POST">
Student id:<input type="text" name="std_id" id="std_id"><br>
Student name:<input type="text" name="std_name" id="std_name"><br>
<input type="submit" name="submit" value="submit">
</body>
</html>
This is the code for fetching
<?php
error_reporting(0);
$app = new \Slim\Slim();
$body = $app->request->getBody();
echo json_encode($body);
?>