| | |
php download a file without redirecting
![]() |
•
•
Join Date: Sep 2004
Posts: 9
Reputation:
Solved Threads: 0
i got a page index.php. i got a link over there to download.php.
in download.php i'll do some mysql things. (like count file download...) and redirect the browser to some file 123.zip.
Wot i really want is. I dont want to go to download.php instead the browser should remain in index.php while i store all data in db.
my link will be site.com/download.php?fileid=xx
and user should get the file in hand without goin to download.php. (i eman he should not go to some blank page (download.php))
i think i am clear.
please help
in download.php i'll do some mysql things. (like count file download...) and redirect the browser to some file 123.zip.
Wot i really want is. I dont want to go to download.php instead the browser should remain in index.php while i store all data in db.
my link will be site.com/download.php?fileid=xx
and user should get the file in hand without goin to download.php. (i eman he should not go to some blank page (download.php))
i think i am clear.
please help
You may use 'include' or 'require' to attach the download.php within your index file. The link to download file will be something like index.php?action=download&id=1234. When someone click the link, the index page will reload and by using isset($_GET['action']), the page will call the download program and the user still in the index page.
I hope this help.
I hope this help.
![]() |
Similar Threads
- Download A file (PHP)
- php.ini file not being read (PHP)
- can't shut down some download file (OS X)
Other Threads in the PHP Forum
- Previous Thread: Get error of MSSQl-proc
- Next Thread: Link problem
Views: 12411 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for PHP
access ajax apache api array beginner box buttons cakephp check checkbox class cms code combobox cookies database date development directory display download dropdown dropdownlist dynamic echo email error file files folder form forms function functions header href htaccess html image images include insert ip java javascript joomla limit link list login loop mail menu mlm mod_rewrite multiple mysql order parse password paypal pdf php problem query radio random regex remote rewrite script search select server session shopping sort sorting source sql storage string structure system table unicode update updates upload url user validation variable video web website wordpress xml zend






i want it to be like that! thnx