Q:

Processing dynamic PHP variable output with domPDF

I've been working on a script where the I should create a PDF from a dynamically created data from a page. After some research, I've decided to use domPDF. I currently use CodeIgniter as my framework so I came up with this tutorial. So from this tutorial, I got the following set of codes for the controller.
Controller: dompdf_test.php -  This will be used for generating the actual PDF based on the loaded view.
class Dompdf_test extends CI_Controller {

    public function index() {   
        // Load all views as normal
        $this->load->view('summary/index');
        // Get output html
        $html = $this->output->get_output();

        // Load library
        $this->load->library('dompdf_gen');

        // Convert to PDF
        $this->dompdf->load_html($html);
        $this->dompdf->render();
        $this->dompdf->stream("SavedData.pdf");
    }
}

Controller: dompdf_view.php - This is just the page to be accessed that will be converted to PDF
class Dompdf_view extends CI_Controller {
    public function index()
    {
        $this->load->view('summary/index');
    }
}

Library: dompdf_gen.php - Located at application/libraries 
class Dompdf_gen {

    public function __construct() {

        require_once APPPATH.'third_party/dompdf/dompdf_config.inc.php'; //this is where the whole dompdf plugin is located

        $pdf = new DOMPDF();
        $CI =& get_instance();
        $CI->dompdf = $pdf;
    }
}

So here it goes: the page that I want to convert to PDF produces data that are manipulated by a user. Generated data are not from database but based on what's selected by a user. For instance, user selected Female as the gender. That "Female" word will be added to a summary tab (on the same page). All data in summary tab will be included on the pdf file. I thought of passing those data to another php file since that page includes a lot of unrelated data for pdf saving and domPDF does not support some CSS syntax (if my understanding was right). Data passed at that said file will be the basis of a simple PDF template tables.
Now here's the problem. I used this very simple code on passing of data:
View: summary/sourceData.php 
- sample page where I should input the data. All entered data will be passed in summary/index view.
<form method="post" action="http://siteURL/dompdf_view"> //dompdf_view is simply the summary/index page
 <input type="text" name="name0" placeholder="Add text"/><br/>
 <input type="text" name="name1" placeholder="Add text"/><br/>
 <input type="text" name="name2" placeholder="Add text"/><br/>
 <input type="text" name="name3" placeholder="Add text"/><br/> 
 <input type="text" name="name4" placeholder="Add text"/><br/>
<input type="submit" name="submit" value="Pass Variable"/>

</form>

summary/index.php - This is where the data is passed.
 <?php 

$name0 = isset($_POST['name0']) ? $_POST['name0'] : "";
$name1 = isset($_POST['name1']) ? $_POST['name1'] : "";
$name2 = isset($_POST['name2']) ? $_POST['name2'] : "";
$name3 = isset($_POST['name3']) ? $_POST['name3'] : "";
$name4 = isset($_POST['name4']) ? $_POST['name4'] : "";

    echo $name0.'<br/><br/>'; 
    echo $name1.'<br/><br/>'; 
    echo $name2.'<br/><br/>'; 
    echo $name3.'<br/><br/>'; 
    echo $name4.'<br/><br/>';

    ?>

    <a href="<http://siteURL/dompdf_test>">Save as PDF</a>  

Data from summary/sourceData.php are passed to summary/index.php but when I try to save summary/index.php to pdf, it saves but does not get any data. It's just a BLANK PDF document except for the word Save as PDF.
I researched and tried adding  but still no luck.
Can't domPDF read php echo files? If not, how?
I have no idea yet how I will be able to save those data to pdf. Or, is there another way to pass those data?
NOTE: Code above is working if the page is a static one. But when I add dynamic data, it does not read the PHP results from that page inside the PDF file. 
Any help/advices will be greatly appreciated. 

A:

We came up with a solution to my problem. Data submitted was not passed to the controller that's why it's blank. What we did was, we submitted the data through input post and added the following in the controller:
$html = $this->load->view('summary/index', $data, true);

Thanks for all the help! :)

