Jump to content


This topic is now archived and is closed to further replies.


PHP Mail/Function Question

Recommended Posts


I have a PHP function called 'database_backup()' that makes a complete backup of a MySQL database. Every time I run the php file I want it to email me the backup. I tried doing it like this:

$my_message = database_backup();

mail($my_email, $my_subject, $my_message, $my_headers);

But that didn't work - How can I include the contents of a function in an email message?


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.