If you get error in WAMP or XAMP server – localhost, either use standard hosting environement like www.zeewebhosting.com or

  1. disable Display errors in WAMP.
  2. 2 mechanisms to access a MySQL database.

i.e. the mysqli_* interface
or the PDO interface

Solution to Problem:

GO to WAMP > PHP > Extension and enable or check, mysqli extension and then restart WAMPserver.

else go to php.ini file any uncomment this line