Steve buehler - 2002-04-12

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.

----code snippet----
header('Content-Type: application/octetstream');
header('Content-Disposition: inline; filename="database.sql"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');

$result = `mysqldump -q -u$userName -p$password -h$hostName $databaseName`;
echo nl2br($result);
---end code snippet----

Thank You in advance.