</html> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Inserting HTML Contents At the End of the Elements in jQuery</title> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> </head> <body> <table> <tr id="tab1"> <th>Name</th> <th>Status</th> </tr> </table> </body> <script> $(document).ready(function(){ $("#tab1").append('<?php $con = mysqli_connect("localhost","root","","oatdistribution"); $tabsql = "SELECT Name, Status from jan"; $data = mysqli_query($con,$tabsql); while($row = mysqli_fetch_assoc($data)){ echo "<tr>"; echo "<td>" . $row['Name']."</td>"; echo "<td>" . $row['Status']."</td>"; echo "</tr>"; } ?>'); }); </script> </html>
John Delivered Richard Delivered Name Status Sam Delivered Allan Not Delivered Michelle Not Delivered
tab1
<tr>
<table>
<table id="tab1"> <tr> ...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)