[thelist] PHP puts sessid and stops W3C validation

john at johnallsopp.co.uk john at johnallsopp.co.uk
Sun Apr 25 03:04:51 CDT 2004


Hi

I have a line in my page like this:

<div class="secondColThird"><form action="abc.php4"
method="post"><p><input type="submit" value="register"></p></form></div>

and I'm trying to get the 4.01 strict page through the W3C HTML validator
at <http://validator.w3.org/>

When the page is served, the PHP server adds a PHPSESSID like so:

<div class="secondColThird"><form action="abc.php4" method="post"><input
type="hidden" name="PHPSESSID" value="786a55eec739cdf482d7c9cebf61327a"
/><p><input type="submit" value="register"></p></form></div>

which I thought was weird but am fairly sure now (it does on a different
server/ISP and the ISP says that's right) is OK.

The problem is, I'm getting a "Line 30, column 152: document type does not
allow element "INPUT" here; missing one of "P", "H1", "H2", "H3", "H4",
"H5", "H6", "PRE", "DIV", "ADDRESS" start-tag" error. It would be OK if
the  server put its <input> within that <p> tag, but it doesn't.

It's already within a <div> tag, so what's it's problem anyway?

How can I get this page validated? All help appreciated.

Cheers
J




More information about the thelist mailing list