Web Analytics Made Easy -
StatCounter PHP Mail/Function Question - CodingForum

Announcement

Collapse
No announcement yet.

PHP Mail/Function Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Mail/Function Question

    Hi,

    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:

    Code:
    $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?

    Thanks,

  • #2
    what ur function is returning?
    if its returning a string, then u will take this string into ur variable.
    if its returning a file, then u can send as an attatchment to urself.
    God helps those who help others.

    Comment

    Working...
    X