I am trying to find the best way to backup my database. I originally wanted to set it up so that the database would dump to an email sent to me nightly, but i am not really even sure where to begin with that. so I set the following code up, but it is giving me an error as well. Would love a hand with this, or even better a pointer on how to get the database dumped to an email nightly so i dont have to do it manually!
Heres the error:
Fatal error: Function name must be a string in C:\wamp\www\invdb\includes\backup.php on line 5
and the code:
[php]
Choose Data To View
Completed Orders
Current Orders
Production
Recieving
Shipping
Backup.php
[php]<?php
$tableName =make_safe($_POST(‘db_chooser’));
$backupFile = ‘backup/’ . $tableName . ‘.sql’;
$query = “SELECT * INTO OUTFILE ‘$backupFile’ FROM $tableName”;
$result = mysql_query($query); ?>[/php]