I have a php script on server side that collects data and inserts into MySQL database ;
$sql = "INSERT INTO tbl_marks (value) VALUES ('".$_GET["value"]."')";
I can add values from browser without issues as such ;
http://localhost/write.php?value=100
But I can't post from Python using requests ;
r = requests.post('https://localhost/write.php?', data = {'value':'100'})
There are no errors or warnings but I see that no entries are written to the table from Python. What am I doing wrong ?
print(r.status_code)check if your POST message was successful?httpsin your python code. was that a typo.