[thelist] Re: PHP and problem validating XHTML strict page

Edwin Horneij edwin at lanset.com
Fri Jul 5 16:33:01 CDT 2002

>> I think adding an ID attribute to the INPUT tag with the same
> value as
>> the NAME attribute will make the code validate.
>> -- Ed Horneij
> Ed,
> That's it exactly ... can't believe I missed it. Unfortunately, as
> this INPUT tag is auto-generated by PHP (at least as far as I
> can tell) I have no control over it. I guess maybe it's time to
> update my PHP version.
> Thanks!
> Nathan

Nathan --

Yeah, after I sent it I realized it was only half an answer.

I don't have a lot of experience with sessions, but from what I've read
in the PHP docs it seems that PHP passes the session ID this way when
cookies are not available. My understanding is that you can do it
yourself -- write your own INPUT tag like this

<input type="hidden" name="PHPSESSID" id="PHPSESSID" value="<?php echo
session_id(); ?>">

and then PHP will not generate its INPUT tag automatically. Worth a try

-- Ed

More information about the thelist mailing list