$ dbuser = "dbuser"; // enter your username database here
$ dbpass = "dbpass"; // enter your database password here
$ dbname = "dbname"; // enter your database name here
$ sendto = "Send To
$ sendfrom = "Send From
$ submitubject = "Daily Database Backup"; // the subject of the email
$ bodyofemail = "Here is the daily backup of my database.";
4. Save the file and upload the entire folder to your server. Note: This folder includes a .htaccess file to prevent any access from the browser. If you want to access it from your browser, you can remove the .htaccess file .
5. In the session of the Cron job in cPanel, enter the following command:
php -q /path-to-the-php-script-folder/backup.php