note 119925 added to reserved.variables.session

From: Date: Tue, 20 Sep 2016 22:56:30 +0000
Subject: note 119925 added to reserved.variables.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-206643@lists.php.net to get a copy of this message
If you are using a session variable as a token to use as a handshake on next page load and the token updates on the new page load, but they mysteriously will not match and there is no obvious explanation. I had the following happen and maybe it will save you some time. I was making a form that allowed an image upload and had an image tag ready to drop the src of the preview in after the file was chosen. But I had a preset src of "#"... this loaded the page a second time in the background and updated my token invisibly causing a broken handshake. My tag looked like this: <img src="#" id="myimagepreview" alt="image preview" /> Leave the source blank and the handshake will not break. ---- Server IP: 72.52.91.14 Probable Submitter: 24.121.87.209 ---- Manual Page -- http://php.net/manual/en/reserved.variables.session.php Edit -- https://master.php.net/note/edit/119925 Del: integrated -- https://master.php.net/note/delete/119925/integrated Del: useless -- https://master.php.net/note/delete/119925/useless Del: bad code -- https://master.php.net/note/delete/119925/bad+code Del: spam -- https://master.php.net/note/delete/119925/spam Del: non-english -- https://master.php.net/note/delete/119925/non-english Del: in docs -- https://master.php.net/note/delete/119925/in+docs Del: other reasons-- https://master.php.net/note/delete/119925 Reject -- https://master.php.net/note/reject/119925 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206643) next »