Are you sure you are using a MySQLi connection? Can you test the connection in Dreamweaver and see results? It determines which version of the code based on the type of connection selected and Dreamweaver has to be able to actually connect to the database when you test the connection. Which code exactly is wrong? Can I see a sample page with the issue? Please attach the connection with the page so I can make sure that isn't wrong somehow.