The best way to make changes on a page without messing up the rest of the page is to use
AJAX[
^].
Instead of letting the form read and send the input values for you, use DOM to read them for you AJAX submission.
This is extra work compared to submitting a form but it allows you to validate each entry before the submission (a good idea, is it not?).
Once you get used to using an AJAX call to php you'll find the whole thing hardly more trouble then an HTML form.