It looks like there were two recordsets on the page with the same name, so the update to MySQLi left some old code behind. Just delete lines 38-43 and you should be ok. You can also delete lines 3-32 since those aren't being used anymore either.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.