I am making a report with fpdf. My problem is I want to call the function that using fpdf class in new window after processing save to database, like this: I can figure like this 1. First I have to save to the database, with the data posted form form html. 2. Call fpdf function to print the result with the same data with the first process. 3. redirect to index function to show that data has been saved into database.
my code like this :
//save to database
$this->My_model->insert($data);
//call the pdf function
$this->print_the_result($data);
//redirect
redirect('my_class/index');