I am trying with a very simple example where my data is temperature, and I want it to be seen on my website index.php page after I successfully POST data from my python code.
Heres my simple index.php code;
<?php
echo 'Hello ' . $_POST["temp1"] . '!';
$data=$_POST["temp1"];
?>
<html>
<head>
<title>Sensor Data</title>
</head>
<body>
<h1>HELLO </h1>
<?php
printf("<tr><td> %s </td></tr>", $data)
?>
</table>
</body>
</html>
I am sending a POST request using requests from python,
import requests
r = requests.post("http://www.********.com", data={"temp1":"Anum"})
print(r.text)
My POST request works perfect, and I can see the result of print(r.text) as "Hello: Anum! " , But it actually doesn't appears on my server index.php page even if I refresh it. What can be the reason ? Thanks i advance for everyones help :)