Let's say I have a PHP file that contains a POST
or GET
variable:
if(isset($_POST['data'])){
$data = $_POST['data'];
echo $data;
}
Is it possible to update that value, While the user is viewing that page?
So that when I (The admin) click a button on another page, A value is changed in the DB and that variable or an html element is changed?
So for example (Didn't work):
$.post('file.php', {data: data}, function(){});
Then while the user is viewing that file.php
, The $data
is updated with the new posted data.