W3C home > Mailing lists > Public > www-validator@w3.org > February 2005

Re: [VE][65] Error Message Feedback

From: Samuel Rinnetmaki <samuel@iki.fi>
Date: Sat, 26 Feb 2005 11:24:13 +0200 (EET)
To: Vincent <vincent@lecourshtml.com>
Cc: "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <Pine.LNX.4.44.0502261101240.22156-100000@mail.rumpalipoika.fi>

> I'm using PHP and sessions and this element input is inserted 
> automatically after the form tag. So I can't  put before a <div> tag 
> and i've seen this problem on other forums too. How can i validate my
> page ?

Although PHP configuration has little to do with validator.w3.org, I'll 
Cc: the list in order to ease the pain for all the other people seeking 
for a solution to the same issue.

Change the value of the PHP configuration option url_rewriter.tags (in 
php.ini, .htaccess or by calling ini_set()).  The default value is:
url_rewriter.tags = "a=href,area=href,frame=src,form=,fieldset="
See <http://php.net/manual/ini.php>.

By default, PHP adds the session identifier into a hidden field after a 
form element.  If you disable that (by removing the part ",form=") from 
the default value above, your sessions might not work in browsers that 
reject your cookies.  A workaround is to make sure that every form has 
at least one fieldset element and the hidden input is added to the 
fieldset.

Another option (as Jukka suggested) is to choose a doctype which allows 
input elements directly inside <form>s.

Regards,

	Samuel
Received on Saturday, 26 February 2005 09:39:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:18 GMT