Well, as Iâve said before on other recent threads, itâs going to be difficult for anyone to spot a problem in your code if the code you post isnât the code youâre actually having trouble with.
You could try adding this to the lower end of the PHP after you close the connection:
$conn->close();
}
// add this bit:
else {
echo "didn't get POST var";
}
That would tell you whether itâs the GET/POST thing. I donât know much about JS, but my guess would be changing from $.get to $.post might make the difference.
OK, stick a random echo() at the start of the PHP, before itâs even tried to check the POST variable, see if that helps. If the PHP is running, it should at least display that if nothing else.
Also, is there any need for the html body tag in there, if itâs just a background update routine?
OK, so you can see that itâs running the âelseâ bit that you added in, so itâs not getting a value for $_POST['key'], hence not doing the update.
As I said before Iâm not that familiar with JS and Ajax stuff, how do you decide that the POST variable is called âkeyâ? Wonât the value be whatever the id of the changed textarea is? Instead of the initial echo() you added in, could you do: