Help with my component to download a file

Marco Adamo Di Giuseppe Posted in Component Development 7 years ago

Hello,

im making a component where from user page i download a file, but now in this file there is all the html code that i don't need... maybe in the oss_com.php I have to remove something?

Replies
German Marco Adamo Di Giuseppe Replied 7 years ago

It's a simple form. The file downloaded is the entire html page and the function in the post.

I need only the data of the funtion, how can I solve?

<form method="post" action="#">
<button name="btnfunc" class="btn">
<span class="white-text">Save</i></span></button>
<?php if(isset($
POST['btn_func'])){

                     $card = new data();
                     $card->setnew("first_name", $params['user']->first_name);
                     $card->setnew("last_name", $params['user']->last_name);
                     $card->download();

                        ;}?>
              </form>
Indonesian Arsalan Shah Replied 7 years ago

Please upload your code to github.com so we can see the code and find out what is the issue, without knowing the code we are unable to help!