Im using data stored from session and when I refresh the page the tbody and the td is looping and printing again.
How to prevent looping again the tbody when refreshing the page without unsetting the session. Here's my code
$html.="<table border='1' width='100%' style='padding-top: 8px; border-collapse: collapse; font-size: 10px;'>";
$html.="<thead><tr>";
$html.= "<th>"._('ID')."</th>
<th>"._('FIRSTNAME')."</th>
<th>"._('LASTNAME')."</th>
<th>"._('ADDRESS')."</th>";
$html.= "<tbody>";
for($x = 0; $x < sizeof($data2); $x++){
$html.= "<tr>";
$html.= "<td>". $data2[$x]->ID."</td>
<td>". $data2[$x]->FIRSTNAME."</td>
<td>". $data2[$x]->LASTNAME."</td>
<td>". $data2[$x]->ADDRESS."</td>
$html.= "</tr>";
}
$html.= "</tbody>";
$html.= "</table>
How to prevent looping again the tbody when refreshing the page without unsetting the session. Here's my code
$html.="<table border='1' width='100%' style='padding-top: 8px; border-collapse: collapse; font-size: 10px;'>";
$html.="<thead><tr>";
$html.= "<th>"._('ID')."</th>
<th>"._('FIRSTNAME')."</th>
<th>"._('LASTNAME')."</th>
<th>"._('ADDRESS')."</th>";
$html.= "<tbody>";
for($x = 0; $x < sizeof($data2); $x++){
$html.= "<tr>";
$html.= "<td>". $data2[$x]->ID."</td>
<td>". $data2[$x]->FIRSTNAME."</td>
<td>". $data2[$x]->LASTNAME."</td>
<td>". $data2[$x]->ADDRESS."</td>
$html.= "</tr>";
}
$html.= "</tbody>";
$html.= "</table>