@vmallder
Thanks for your reply.
I found out that the problem was due to PHP version. The code is written for PHP5 and I was using PHP7. As in the activation part, you use mysql_connect and now you have to use mysqli_connect and same apply at other place.
By the way thanks for your help.
5/5
Regards.