#22070 [Ver->Csd]: trans_id: Hidden fields placed incorrectly
| From: | sniper@php.net | Date: | Wed, 05 Feb 2003 22:01:38 +0000 |
| Subject: | #22070 [Ver->Csd]: trans_id: Hidden fields placed incorrectly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32240@lists.php.net to get a copy of this message | ||
ID: 22070
Updated by: sniper@php.net
Reported By: jonas@understroem.dk
-Status: Verified
+Status: Closed
Bug Type: Session related
Operating System: Linux
PHP Version: 4.3.0
New Comment:
You can disable the adding of the hidden field by
removing 'form=' from url_rewriter.tags
Previous Comments:
------------------------------------------------------------------------
[2003-02-05 09:16:05] magnus@php.net
Output from http://validator.w3.org:
Line 7, column 115: document type does not allow element
"input" here; missing one of "ins", "del", "h1",
"h2",
"h3", "h4", "h5", "h6", "p", "div",
"address", "fieldset"
start-tag
...="f78cfab3aa4745920992c99cabedc75f" />
^
------------------------------------------------------------------------
[2003-02-05 08:33:42] jonas@understroem.dk
When using session.use_trans_sid, a hidden input field containing the
session name and ID is placed right after the <form> tag. Unfortually,
this makes the HTML invalid if you're using XHTML 1.1, strict XHTML
1.0, or strict HTML 4.0: All input fields (even hidden ones) must be
placed inside a block-level element such as <div> or <p>.
The solution: When the parser discovers a form on the page, it should
place the hidden field containing the session name + ID right next to
one of the other input fields:
The original page:
<form action='some.php' method='post'>
<div>
<input type='text' name='yourName'/>
</div>
</form>
After being processed by the parser:
<form action='some.php' method='post'>
<div>
<input type='hidden' name='PHPSESSID'
value='920203'/><input
type='text' name='yourName'/>
</div>
</form>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22070&edit=1