note 63800 added to function.session-start

From: Date: Fri, 31 Mar 2006 11:28:38 +0000
Subject: note 63800 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-107068@lists.php.net to get a copy of this message
If you're interested in creating XHTML 1.0 Strict validating pages, using sessions creates a problem. If you output a form, a hidden field containing the PHPSESSID variable is automatically placed in there, ending up looking something like this # <form style="width: 210px; margin-left: auto; margin-right: auto; margin-bottom: 4px; text-align: left;" method="post" action=""><input type="hidden" name="PHPSESSID" value="5eeec5d775e66e46a656c0e64216d2d6" /><div> # Name:<br /> # <input name="nickname" id="nickname" type="text" ... Now, XHTML requires there to be a <div> or some containing tag before any input tags, so this won't validate. I haven't found a workaround for this, because I'm not that great a PHP hacker, nor do I like messing around with source that large anyway. Using XHTML 1.0 Transitional will allow your page to validate. ---- Server IP: 66.163.161.117 Probable Submitter: 213.42.2.11 (proxied: 217.165.94.243) ---- X-Spam-Status: No, hits=4.0 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_50_60,HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- http://master.php.net/note/edit/63800 Del: integrated -- http://master.php.net/note/delete/63800/integrated Del: useless -- http://master.php.net/note/delete/63800/useless Del: bad code -- http://master.php.net/note/delete/63800/bad+code Del: spam -- http://master.php.net/note/delete/63800/spam Del: non-english -- http://master.php.net/note/delete/63800/non-english Del: in docs -- http://master.php.net/note/delete/63800/in+docs Del: other reasons-- http://master.php.net/note/delete/63800 Reject -- http://master.php.net/note/reject/63800 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107068) next »