Forum Moderators: coopster

Message Too Old, No Replies

need script to open the browse window?

         

shams

11:07 am on Oct 16, 2006 (gmt 0)

10+ Year Member



hi
i want a script for php-mysql to backup the mysql data and restore, how i can write to open a browse window to select the desitanion directory to backup data there?

barns101

1:34 pm on Oct 16, 2006 (gmt 0)

10+ Year Member



If you're talking about an HTML link it would be along these lines:

<a href="http://example.com" target="_blank">Link text</a>

herculese

6:04 pm on Oct 16, 2006 (gmt 0)

10+ Year Member



Are you trying to make the user save the file rather than displaying it in the browser? If so, add the following line to the beginning of the PHP page that creates the backup:


header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=backup.txt");

You might want to change the filename/extension.

Have a nice day!