Hello developers out there,
I want a php file communicate between android application and mysql server. Because I had alot of trouble setting this up, I tried to learn it step by step because none of the tutorials I found so far is working for me. After a while I understod that my php file does not get any _POST response.
This is the php file:
<?php
if(isset($_POST['id'])){
echo $_POST['id'];
}else{
echo "no id";
}
if(isset($_POST['stringdata'])){
echo $_POST['stringdata'];
}else{
echo "no stringdata";
}
?>
which always shows "no idno stringdata" (tested with postman and other files also tested with android studio). So in every file this "isset($_POST['stringdata']))" gives false.
Now my question: what am I doing wrong? How can I give variables to the php file? Thank you :)
EDIT:
How I said I am doing it with "Postman", this programm gives this line to submit it if I am getting it right:
localhost/android_connect/testscript.php?id=123&stringdata=whatever