First I have to give my usual speech “Don’t use mysql instead use mysqli or PDO”
OK, now that is out of the way, put you jQuery in the body of the html, preferably at the bottom. Second get your jQuery script to work the way you want it to, then you can interject a MySQL database using PHP. Doing it this way will cause a lot less headaches and be easier to debug.
Here’s an example that I think that you are after:
[code]<!doctype html>
even demo
table {
border-spacing: 0.5rem;
border-collapse: collapse;
width: 600px;
margin: auto;
}
th, td {
border: 2px solid #2e2e2e;
padding: 20px;
}
Name |
ID |
Favorite Color |
Jim |
00001 |
Blue |
Sue |
00002 |
Red |
Barb |
00003 |
Green |
Lisa |
00002 |
Pink |
John |
00003 |
magenta |
[/code]
It looks like it’s odd but it is actually even, for it starts with the rows and not the header of the table.