Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Is it legitimate to have a continuous TABLE through multiple FORMs? Date: Thu, 25 Apr 2019 08:55:18 +0200 Lines: 49 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net k39ht+P/p/7OaW1m2fbLyQxWXm9UD4kc+sB0bhPcqGymxUC/Em Cancel-Lock: sha1:2DqFwJBTitotBCiMZqe7krYEFLA= Openpgp: preference=signencrypt In-Reply-To: Xref: csiph.com comp.lang.php:17883 Dan Campbell: > Hi, > > I've been working with code designed by a developer who left, around > a year ago. > > She was a decent programmer, and most of her stuff is easy to read > and modify. > > I had a minor issue with her including substantive js snippets inside > the php/html module. But that was easy to deal with. > > > But one quirk of her FORM design keeps triggering errors in my IDE.[...] And what does that have to do with PHP? This is a question about HTML. And it's easy to answer: either it is valid HTML or not. > She starts a FORM, then a table inside that form, and does a few > things. > > Then, without closing the table, she closes the FORM, creates another > form, and immediately starts adding rows to the first table, without > creating a table. This is not valid. > It's like continuing a single table through multiple forms. > > The funny thing is, it runs fine. The Browser doesn't complain about > it, although my IDE complains (appropriately, imo) of nesting > issues. Browsers are designed to cope with invalid HTML to a certain degree since people often create invalid code. But nevertheless it is still invalid HTML. To be sure use validator like . > Obviously, this style isn't recommended, but is it legitimate? > Should I go ahead and refactor these forms, with properly nested > tables? Yes, you should refactor it to be valid HTML. -- Arno Welzel https://arnowelzel.de