Will the MySQL connection remain open in the code below after we leave the script page?
$mysqli = new mysqli("localhost", "root", "", "mydb"); $mysqli -> query("SET NAMES 'utf8'"); // манипулируем с БД echo "<script type=\"text/javascript\"> window.location.href = \"http://localhost/oterpage.php\" </script>"; $mysqli -> close(); I made the redirect via JS, because before this code I already had output to the browser and because of this the header cannot be used.