Help with my component to download a file

Marco Adamo Di Giuseppe Posted in Component Development 8 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 8 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="btn_func" class="btn">
<span class="white-text">Save</i></span></button>
<?php if(isset($_POST['btn_func'])){

                     $card = new data();
                     $card-&gt;setnew(&quot;first_name&quot;, $params["user"]-&gt;first_name);
                     $card-&gt;setnew(&quot;last_name&quot;, $params["user"]-&gt;last_name);
                     $card-&gt;download();

                        ;}?&gt;
              &lt;/form&gt;
Indonesian Arsalan Shah Replied 8 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!