mysqli and AJAX
问题 I am getting pretty confused trying to switch from MySQL to MySQLi, and I'm just trying a very basic example to see if I can get it to work. Please forgive the poor practice of using .post instead of .ajax and not returning JSON for now, I'm just using some old code to see if I can get queries to work. Currently, on index.php, I create a new connection: $connection = new mysqli($host, $username, $password, $database); if (mysqli_connect_errno()) die(mysqli_connect_error()); Then, using jquery