mercredi 4 février 2015

How to download file in new page in php

i am a beginner in php and i am trying to develop a music site where users can download the songs. Now, when a user clicks the download button i want to make the song to download in new a webpage. The following is the code and i cant figureout where to modify it so that song will be downlaoded in a new webpage. Please help me to solve the problem.



<div class="search-buttons" >
<!-- ON DESKTOP -->

<a class="no-tablet-portrait no-phone button success" onclick="open_download('<? echo $GLOBALS["sys"]->get_url(); ?>download.php?download=<? echo $search->id; ?>', '<? echo download_mode; ?>');" title="<? echo lng_btn_download; ?>" ><i class="icon-box-add" ></i><? echo lng_btn_download; ?></a>
<!-- ON PHONE OR TABLET -->

<a class="no-desktop button success" onclick="open_download('<? echo $GLOBALS["sys"]->get_url(); ?>download.php?download=<? echo $search->id; ?>', 'direct');" title="<? echo lng_btn_download; ?>" ><i class="icon-box-add" ></i> </a>
</div>




Aucun commentaire:

Enregistrer un commentaire