This page seems to have a mixture of old MySQL code and new MySQLi code. It might have something to do with the tutorial being out of date or it might be an issue with the extension. If you post your phone number and a good time to reach you I could have you go through how you created this page and the settings you used in order to debug and see where it gets out of sync.