I want to dump a database after certain conditions are met with an if statement inside a php file and have the dump sent to me via email.
Problem is that I cannot find out how to do it.
I tried the following that just produced a blank page:
<?php
header('Content-type: application/octet-stream');
echo mysqldump -umyusername -pmypassword mydbname;
?>