[thelist] PHP Session ID stopping HTML validation SOLVED

john at johnallsopp.co.uk john at johnallsopp.co.uk
Thu May 11 03:18:39 CDT 2006


>>> On 3/31/06, john at johnallsopp.co.uk <john at johnallsopp.co.uk> wrote:
>>>> Hi ppl
>>>> I'm trying to create a valid HTML 4.01 Strict web page and the
W3C
>>>> Validator seems to require me to put a containing element around the
>>>> <input>s, eg. <p>. It's not accepting <p><form>.., requires
>>>> <form><p><input.. >
>>>> The problem is PHP wants to put its sessionId between the form
and
>>>> the
>>>> input: <form method='post' action='myP.php4'><input type="hidden"
name="PHPSESSID" value="386bfe3c6ad31ed768ea88c0f3a809e7"
>>>> /><p><input
>>>> type='hidden' name='subc' value='1'> ..
>>> Not sure about the PHP apsect.
>>> Could you use a fieldset inside the form? maybe PHP would place
the
>>> sessionId inside the fieldset, which should help validate.
>>> ben
>> Thanks Ben, that worked, once I'd sorted out a legend too, and I
didn't need the <p> after all:

> Correction, no it didn't work. It worked in my *false* test page,
but
> when I've just implemented it properly on the site, PHP still puts
the
> SESSID outside the fieldset.

I've had another look at this problem. It's solved by some advice I
got, embarrassingly, in 2004 from David Dorward in this forum, about
the same problem.

He advised to go with XHTML 1.0 Transitional as the only (at that
time, not sure if it's still true) standard that handles PHP SESSID
and allows the page to validate. The problem was happening under 4.01
strict.

I thought for a moment it was going to throw out my onMouseOvers but
they just needed to move to lower case, and jobsaguddun.

Thanks for everyone's help.

Cheers
J





More information about the thelist mailing list