Why are you making it harder to maintain and develop by putting the static scripting in the markup? I don't know what you are using to wrap your database accesses, but it looks like a waste of memory as I suspect that $res is being filled with the complete result set. (try to avoid doing that! Pass the result handler, NOT the result!)... and that markup... This is 2014 not 1997, what's with the FONT tags, CELLPADDING, BORDER, ALIGN and TARGET attributes, and host of other things that are a decade and a half out of date? (and a guaranteed waste of bandwidth in the age of CSS!)
On the PHP side why are you using multiple echo to do the job of one? Why do you have an outer table that will only ever have one TD (that's a DIV's job -- assuming there should even BE a wrapper). Where are your LABEL on the form? What makes that form tabular data?
Why are you using target="_SELF" when that's the default behavior? Again, not that you should be using TARGET in the first place!
Much less all the hidden ID that only seem to serve a purpose for scripting, in which case output them as scripting.
Worse though, you seem to be setting up to output multiple rows. If in those rows they all get the same 'name' inside the same form, how is anything except the first row even supposed to work? I'd consider using (textContent || innerText) on the TD instead of using hidden inputs for that. Then it would be a simple dom-walk that you could easily automate.
Basically, about a third to half your HTML belongs in the trash can as unneccessary bloat, and what you are trying to do with the scripting makes no sense for what your multiple rows of output is.
You should probably also learn what THEAD, TBODY, CAPTION and TH are for, and how to use them.