I want to call a php script from an Anchor.
file.html
<body>
<a href="file.php?id=1">Click</a>
</body>
script.php
<?php
$id = $_GET['id'];
... <do some stuff>;
<when finished doing some stuff reload file.html>;
?>
Then once my php in script.php has run I want to reopen the original file. I’ve tried load() and loadHTML(), neither has worked. What PHP function will load file.html?
Thanks so much.
You’ll want to redirect the user to the original page:
Just make sure you don’t output anything (send data to the browser) before redirecting.