[thelist] PHP and problem validating XHTML strict page

Nathan Wright ominous at rmh-d.com
Wed Jul 3 13:45:01 CDT 2002

Has anyone else encountered this problem before? I am writing an XHTML strict page. This page validates. I then
try to place a form on my page (the code for the form is below), at which point the page no longer validates:

<form id="FormName" action="http://www.rmh-d.com" method="post">
<div class="row">
<span class="label"><label>Label:</label></span>
<input type="text" name="textfieldName" size="24" />
<div class="row">
<span class="label"><label>Really long label just to see what happens:</label></span>
<input type="radio" name="default" value="radioValue" />Yes <input type="radio" name="default"
value="radioValue" />No
<div class="spacer">&nbsp;</div>
<div class="buttons">
<button type="submit">Submit Me &crarr;</button> <button type="reset">&otimes; Reset</button>

The problem that I am encountering is that PHP seems to be "adding" an extra bit to my form, and it is this extra bit
that causes my page not to validate. The affected line is below:

<form id="FormName" action="http://www.rmh-d.com" method="post"><input type="hidden" name="PHPSESSID"
value="4618317f1fa2867d08672cfed847911c" />

As you can see, the hidden input tag was not there in the original, and furthermore is not there if you view the
source code of the page after the page is parsed in the browser ... but for some reason when you run the page
through the validator the PHPSESSID code gets added to the page, and this causes the page not to validate.

Does anyone have a clue about why this is happening and how I can make it stop?

Thanks in advance,

More information about the thelist mailing list