I created a database dumb backup script and it forces a download when that script runs. It works fine and no problem there.
on another page I want to add a link to that script operation.php?act=dump to force a dumb db backup download. If I use a form like this on page like blah.php:
<form method="get" action="operation.php">
<input type="hidden" name="act" value="dump">
<input type="submit" name="submit" value=" Backup ">
</form>
then if I submit it, I will stay on blah.php and a force download pops up as expected. But is it possible to use a link instead of this form?
something like:
<a href="operation.php?act=dump">backup</a>?
the problem is that when I click this link I will be redirected to operation.php which is obviously blank then a force download pops up as I said the header of operation.php to force download. I need to stay on blah.php when clicking the link just the same way when I use the form.
so is it possible to use a link instead of a form?