Forum Moderators: coopster

Message Too Old, No Replies

Possible to keep session ID when user views .HTM and returns to .PHP

html htm php session id sid

         

jezzer300

9:09 am on Oct 21, 2004 (gmt 0)

10+ Year Member



Hi,

Do I have to convert all my .HTM files into .PHP in order to keep the SID throughout the session. (For users with cookies disabled)?

The first .HTM is loaded fine with?sid=#*$!#*$!xx.
Currently my .HTM has no way to pass on the sid when returning to a PHP script and they get a new sid.

Jez.

mincklerstraat

9:25 am on Oct 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could also just parse your htm files as php - this would be done via htaccess - would result in a performance drop and probably also non-cachability of your .htm files unless you added caching headers, which you could do with a php prepend file in combination with checking the file's age.

AustinMexico

6:51 pm on Oct 21, 2004 (gmt 0)

10+ Year Member



Just in case you, or another reader of this post
doesn't know how you have the system parse html
files as php, you add a single line like this to
your .htaccess file:

AddType application/x-httpd-php .htm .php

Change the .htm to .html if you use that suffix.

I'm sure there is a 'performance hit' as everyone
says so, but it is not noticable in my experience.
Html pages that don't actually include any php code
seem to load as fast as ever ...