[[readGET()]]
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:functions:readget [26.11.2014 16:19] – [readGET()] alexander.ritteren:create:functions:readget [02.01.2015 16:11] admin
Line 14: Line 14:
 ===== Notes ===== ===== Notes =====
  
-  * Reading __only__ works on the first page of the questionnaire, __or__ on a page that was set up using ''[[:en:create:functions-output#option|option('resume', true)]]'' when broken, __or__ if the project administrator ensures the variable was transmitted by using an appropriate link.+  * Reading __only__ works on the first page of the questionnaire, __or__ on a page that was set up using ''[[:en:create:functions:option|option('resume', true)]]'' when broken, __or__ if the project administrator ensures the variable was transmitted by using an appropriate link.
   * Certain variables have a specific meaning and should not be used to transfer user-defined data; see [[:en:survey:url|URL to the Questionnaire]].   * Certain variables have a specific meaning and should not be used to transfer user-defined data; see [[:en:survey:url|URL to the Questionnaire]].
   * Before using ''readGET()'', check whether a value has already been set. In the examples below, ''[[http://php.net/manual/en/function.isset.php|isset()]]'' or ''[[:en:create:functions:getroute|getRoute()]]'' is used to do so. For example, if you put a compulsory question on the first page in the questionnaire, the first page will be shown again if no answer is given, but ''readGET()'' is unable to read the value anymore. This "no value" would then overwrite the correct value already stored.    * Before using ''readGET()'', check whether a value has already been set. In the examples below, ''[[http://php.net/manual/en/function.isset.php|isset()]]'' or ''[[:en:create:functions:getroute|getRoute()]]'' is used to do so. For example, if you put a compulsory question on the first page in the questionnaire, the first page will be shown again if no answer is given, but ''readGET()'' is unable to read the value anymore. This "no value" would then overwrite the correct value already stored. 
Line 39: Line 39:
 In addition, the ID for ''pid'' is set up as the placeholder ''%pid%'' in order for it to be used later in a redirect link (e.g. %%https://www.panelanbieter.com/redirect.php?user=%pid%%%). In addition, the ID for ''pid'' is set up as the placeholder ''%pid%'' in order for it to be used later in a redirect link (e.g. %%https://www.panelanbieter.com/redirect.php?user=%pid%%%).
  
-Here, the use of ''[[:en:create:functions:getroute|getRoute()]]'' ensures that reading and, crucially, ''put'' is implemented at the start of the interview only.+Here, the use of ''[[:en:create:functions:getroute|getRoute()]]'' ensures that reading and, crucially, ''put'' is implemented at the start of the questionnaire only.
  
 <code php> <code php>
en/create/functions/readget.txt · Last modified: 29.09.2020 16:53 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki