The command appears correct. Many unix utilities only provide feedback in the event of a failure. To be sure that the command worked or not you can check that the exit status is 0 or use ls to see what the file permissions are now.
For the first way, you can check the status a couple ways.
chmod 777 /var/www/html/core/database/connect.php ; echo $?
chmod 777 /var/www/html/core/database/connect.php && echo 'it worked'
To check the file permissions, just run ls -l /var/www/html/core/database/connect.php
Please remember though that with 777 permissions any user can read, change, and excecute the file.