I am trying to get the results of a variable to automatically tell the browser to download the results instead of trying to display them in the browser. I can not get it to do anything but display the results. Here is what I have so far. I hope that somebody can help me with this (probably simple) task.
header('Content-Disposition: inline; filename="database.sql"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
$result = `mysqldump -q -u$userName -p$password -h$hostName $databaseName`;
---end code snippet----
Thank You in advance.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.