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

Problem with session SID

P: n/a
This constant doesn't work for me...

<?php echo strip_tags(SID); ?> does nothing, and yes I did start session....

manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Goran Ljubej wrote:
manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???


http://www.php.net/session_name
JW

Jul 17 '05 #2

P: n/a
> <?php echo strip_tags(SID); ?> does nothing, and yes I did start
session....
manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???


SID is the string you need to add when the session id is not passed via a
cookie.
As you do not need to add anything to the url when cookies are enable, SID
is then empty.
Anyway, I don't see why you need to strip_tags(SID) : it doesn't have any
tag.
I would understand a urlencode(SID) a little better, eventhough I think it
is not necessary.

If you need the session name or the session id :
session_name()
session_id()

Jul 17 '05 #3

P: n/a
BLob wrote:
<?php echo strip_tags(SID); ?> does nothing, and yes I did start


session....
manual says that session id should be passed throug url as
session_name=session_id but how can I found out session's name???

SID is the string you need to add when the session id is not passed via a
cookie.
As you do not need to add anything to the url when cookies are enable, SID
is then empty.
Anyway, I don't see why you need to strip_tags(SID) : it doesn't have any
tag.
I would understand a urlencode(SID) a little better, eventhough I think it
is not necessary.

If you need the session name or the session id :
session_name()
session_id()

thanks for your explanation... so basicaly... mine SID was empty because
i had cookies enables?
in manual says strip_tags(SID) for some security reasons... which are
those i don't know... thanks bro
Jul 17 '05 #4

P: n/a
> in manual says strip_tags(SID) for some security reasons... which are
those i don't know... thanks bro


From the manual : "The strip_tags() is used when printing the SID in order
to prevent XSS related attacks." But I don't understand the kind of attack
they are talking about...
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.