for a school project I am creating a forum that should work synchronously, because its purpose is to discuss in real time for a set period. Therefore, it is important to update new updates every time.
At the moment, my forum looks good, but it has one big problem. When I log in, I immediately see my messages. But when someone posted something in between, I can only see this when I post a new reaction or manually refresh the page. Of course, this is very annoying.
I know that this can be fixed with AJAX and / or Javascript, but the problem is that my forum should work without these two things. Therefore, I was looking for solutions, but I did not find what I was looking for.
Every answer I found uses Javasript or Ajax. When I wrote my question here, I founded another simulation that looks the same ("Refresh Div, Table or TR without reloading the page and without using Ajax"), but when I looked back I saw Javasript. So this is still not what I am looking for.
I also tried putting the code to view updates in a different place in my code. but even then it will not work. I hope someone can help me do this well.
Kirsten
Ps: sorry if there are some small errors in English
Here is an example of my code
include('jeugdhulp_2-0_connectie.php');
include('klasses/Reacties.class.php');
$reactie = new Reacties();
$stellingen = $reactie->ToonStelling();
if(!empty($_POST['tekst_gebruiker']))
{
$reactie->Reactie = $_POST['tekst_gebruiker'];
$reactie->ID = $_SESSION["gebruikersid"];
try
{
$reactie->Save();
}
catch(Exception $e)
{
$feedback = $e->getMessage();
}
}
else
{
$feedback = "";
}
$recenteactiviteiten = $reactie->ToonRecenteReacties();
source
share