Код: Выделить всё
const fullusername = "";
const personontheline = sessionStorage.getItem('name');
fetch('inc/AI2.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
fullname: fullusername, //variable
personwhoclicked: personontheline //variable
}) //continues to fetch errors
Код: Выделить всё
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
//do stuff
}
} else {
// Handle invalid requests
echo "Invalid request ".$_SERVER['REQUEST_METHOD'];
die();
}
Код: Выделить всё
if (isset($_GET['fullname']) AND isset($_GET['personwhoclicked'])) { //work }
else{ echo "error"; }
[img]https://i.sstatic .net/WxGNaRAw.png[/img]
Вот как пакет Burp делает это с запросами GET
Подробнее здесь: https://stackoverflow.com/questions/791 ... ackend-and