I'm trying to show the same data, but updated right away. For example. I want to update my coords on a map and refresh a div to show the new data, but as the code now, it keeps the same data until I reload the page. Here is the code I have now.
The update code is before the reload script for the two div's. The data DOES change in the script, but the two div's won't display the new data until it is refreshed again.
Do I need to reactivate fetch to get the new data?
PHP:
if ($north){$ylocation = $users['y'] + 1;if ($ylocation > 5){$ylocation = 0;}$locationyupdate = ("UPDATE players SET y = '$ylocation' WHERE name='$users[name]'"); mysql_query($locationyupdate) or die("could not register");?><script type="text/javascript">$('#npc').load('npc.php');$('#description').load('description.php');</script><?}
The update code is before the reload script for the two div's. The data DOES change in the script, but the two div's won't display the new data until it is refreshed again.
Do I need to reactivate fetch to get the new data?