note 104206 added to function.microtime

From: Date: Wed, 01 Jun 2011 01:30:18 +0000
Subject: note 104206 added to function.microtime
Groups: php.notes 
Request: Send a blank email to php-notes+get-180150@lists.php.net to get a copy of this message
Try this: $_SESSION['formId'] = microtime(); then $string = '<input type="hidden" name="formId" value=' . $_SESSION['formId'] . '/>'; And then submit a form with this you get some unexpected results some of the times. I've found that if you do not use echo $_SESSION['formId'] the variable change the next time you come around. I tried putting an echo in front of my code and then it worked as expected, without the echo I get weird results. Now I will use another function to specify a formId. ---- Server IP: 187.73.33.10 Probable Submitter: 186.232.195.70 ---- Manual Page -- http://www.php.net/manual/en/function.microtime.php Edit -- https://master.php.net/note/edit/104206 Del: integrated -- https://master.php.net/note/delete/104206/integrated Del: useless -- https://master.php.net/note/delete/104206/useless Del: bad code -- https://master.php.net/note/delete/104206/bad+code Del: spam -- https://master.php.net/note/delete/104206/spam Del: non-english -- https://master.php.net/note/delete/104206/non-english Del: in docs -- https://master.php.net/note/delete/104206/in+docs Del: other reasons-- https://master.php.net/note/delete/104206 Reject -- https://master.php.net/note/reject/104206 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180150) next »