You are redirecting to index.php and exit()'ing in the event of success, so you never get to that code nor the mysqli_close.
It's also better to not using a closing ?> *at the end of the file*. If you press enter or a space after ?> for instance in your config.php file which you are including at the top, your header() line might fail because a space or linebreak has already been sent to the output buffer.
|