<?php $hoy = date("Y-m-d H:i:s"); $id = $_POST["id"]; $urlRedirect = $_POST["url"]; include("../models/connect.php"); mysqli_query($connect,"UPDATE Procesos SET estado = '2' WHERE id = '".$id."' "); ?> <script> window.location = "<?php echo $urlRedirect; ?>"; </script>