By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,767 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

PHP generates tags automatically and does it incorrectly.

P: n/a
Hi,

My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />

Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").

I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).

Thank you!
Dec 12 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
sh************@gmail.com a écrit :
Hi,

My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />

Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").

I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).

Thank you!
why you do not use use $_SESSION['PHPSESSID'] ????
Dec 12 '07 #2

P: n/a
On Dec 11, 9:25 pm, Guillaume BASSINET <kan...@gmail.comwrote:
showandbesh...@gmail.com a écrit :
Hi,
My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />
Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").
I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).
Thank you!

why you do not use use $_SESSION['PHPSESSID'] ????
Because I do not know what is it. But if you think it can help me I
will learn it.
Dec 12 '07 #3

P: n/a
sh************@gmail.com a écrit :
On Dec 11, 9:25 pm, Guillaume BASSINET <kan...@gmail.comwrote:
>showandbesh...@gmail.com a écrit :
>>Hi,
My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />
Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").
I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).
Thank you!
why you do not use use $_SESSION['PHPSESSID'] ????

Because I do not know what is it. But if you think it can help me I
will learn it.
can you send me your doctype?
and if you use /it's xhtml, not html strict
Dec 12 '07 #4

P: n/a

<sh************@gmail.comwrote in message
news:cd**********************************@e25g2000 prg.googlegroups.com...
Hi,

My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />

Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").
Is it possible that you are using ampersand in your form.
Example:
if you are using this:
<form action="index.php?id=1&cat=2" method="POST">

use this:
<form action="index.php?id=1&amp;cat=2" method="POST">

If this doesn't help here is some other stuff to read:

http://www.w3.org/QA/2005/04/php-session

Best of luck,
Zvonko
Dec 12 '07 #5

P: n/a
On Wed, 12 Dec 2007 03:15:19 +0100, <sh************@gmail.comwrote:
Hi,

My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />

Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").

I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).
ini_set('session.use_trans_sid',0);

--
Rik Wasmus
Dec 12 '07 #6

P: n/a
..oO(sh************@gmail.com)
>My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />

Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").

I do not know how to force my code NOT to write the hidden-input-tag
in this way.
http://www.php.net/manual/en/ref.ses...-rewriter.tags

Micha
Dec 12 '07 #7

P: n/a
On Dec 12, 6:39 am, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
On Wed, 12 Dec 2007 03:15:19 +0100, <showandbesh...@gmail.comwrote:
Hi,
My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />
Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").
I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).

ini_set('session.use_trans_sid',0);

--
Rik Wasmus
It means that my pages will not work if user's browser does not
support cookies?
Dec 13 '07 #8

P: n/a
On Dec 12, 6:39 am, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
On Wed, 12 Dec 2007 03:15:19 +0100, <showandbesh...@gmail.comwrote:
Hi,
My php code generates the following line:
<input type="hidden" name="PHPSESSID"
value="36e197f92bsd34df4a6a20dkajkf10b4e4" />
Because of this line I cannot validate my page as HTML 4.01 strict
(since the input tag is ended with "/>").
I do not know how to force my code NOT to write the hidden-input-tag
in this way. It is important to mention that this line is generated
automatically. In other words, in my php code I do not have a line
which is intended to write the above shown problematic line (I think
that php writes this line because I use session).

ini_set('session.use_trans_sid',0);

--
Rik Wasmus
I put ini_set('session.use_trans_sid',false); in the first line of my
php source. But it does not prevent php from the writing the SID in
the hidden variables. Why? From the other hand, the usage of
the .htaccess with the included "php_flag session.use_trans_sid off"
helps.
Dec 13 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.