PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP

Solution : Rename your function name emailcomm() to __construct()

Explanation: In previous versions of PHP, if PHP cannot find a __construct() function for a given class, it will search for the old-style constructor function, by the name of the class, but now old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use  __construct() in new code. Read php manual

   function __construct() {
      // copy your old constructor function code here
   }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)