SoSci Survey
Translations of this page:

Table of Contents


int serialCheck(string authorizationCode)

The function serialCheck() reveals whether an authorizationCode is valid, and whether it has already been used. This function can be helpful in calling up an authorization code manually.

Note: Only the status of an authorization code can be checked with this function – the authorization code will not be marked as “used” at the end of the questionnaire.

Return Value

serialCheck() generates one of the following codes:

-1No authorization code specified
0Authorization code not recognized in the survey project
1Authorization code already used (questionnaire is thus completed)
2Questionnaire was already called up with the authorization code, but not completed
3Authorization code yet to be used


The following example assumes that an authorization code was asked for on the previous page in the text input field “AB01_01”. The PHP code now checks whether the authorization code specified is valid. If not, the PHP code shows a text element as an error message, and redisplays the previous page with repeatPage

$serial = value('AB01_01');
$status = serialCheck($serial);
if ($status == -1) {
} elseif ($status == 0) {
} elseif ($status == 1) {
en/create/functions/serialcheck.txt · Last modified: 24.01.2015 13:09 by alexander.ritter
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki