I have an auction site & want to refresh the item page for everyone when the new bid is posted. The item page is called item.php. What I was thinking was that when the new bid is posted to the database when the button clicks, the same click refreshes item.php. The code I'm looking at is
if (!isset($_POST['action']) && !isset($_GET['refresh'])) {
header("Location: /item.php?refresh");
}|| isset($errmsg))
The original code was
if (!isset($_POST['action']) || isset($errmsg))
but this is not working.
I'm wondering is there a simple onclick
solution I can add to the button in bid to refresh item.php for everyone.
I also looked at AJAX but I don't understand how to apply it here.
Any advice on the best solution to this is appreciated.