I am mediating a nav-item (bootstrap) by saving data in a database using a php file, but at the time of saving the data the php file is opened and I would like it to be executed only without it being opened, that is, that only makes the insertion of data without it being opened.
the nav-item in my file:
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="#">
<span data-feather="home"></span>
Dashboard <span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="y.php?valor=0">
<span data-feather="file"></span>
Activar
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="bar-chart-2"></span>
Reportes
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="layers"></span>
Operaciones
</a>
</li>
</ul>
My php file:
<?php include ('functions.php');
$valor=$_GET['valor'];
ejecutarSQLCommand("UPDATE fs SET State='$valor' WHERE Color= 'red'");
?>