note 69352 added to ref.session

From: Date: Fri, 01 Sep 2006 18:56:16 +0000
Subject: note 69352 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-116595@lists.php.net to get a copy of this message
Similar to the use of captcha images you can easely track and advise user who don't accept cookies, especially no session cookies without redirecting them. so here's the deal: if the main script (which outputs the html) doesn't have a value in it's session which says that a session is running successfully a different value is saved in the session and an image is included in the html which checks wether the session-check value is set or not. If it's set the image-script sets a confirming value which will verify the session to be running correctly and output a transparent 1*1px gif. If the value is not set the image outputs an advising image which tells to allow cookies. You can also wrap the image with a link who refers the user to a page addressing the cookie issue. If the 1px trans is generated the user will hardly find the link, but if the error-image is generated he will surely be able to click it. pros: - works - no rerouting, you can see the result on the first page opened by the user - no javascript cons: - bad accessebility (if you give the image an alt-text any blind user will read it at least on the first call, but you cold also write this into the alt text... so maybe there are no cons) i hope this'll help ---- Server IP: 217.160.72.57 Probable Submitter: 85.176.166.109 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- https://master.php.net/note/edit/69352 Del: integrated -- https://master.php.net/note/delete/69352/integrated Del: useless -- https://master.php.net/note/delete/69352/useless Del: bad code -- https://master.php.net/note/delete/69352/bad+code Del: spam -- https://master.php.net/note/delete/69352/spam Del: non-english -- https://master.php.net/note/delete/69352/non-english Del: in docs -- https://master.php.net/note/delete/69352/in+docs Del: other reasons-- https://master.php.net/note/delete/69352 Reject -- https://master.php.net/note/reject/69352 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116595) next »