0 votes
ago in Methoden-Fragen by s320294 (110 points)

For my questionaire i want to save an API-Key from prolific in a text, so i dont have to put it directly into my php-code. unfortunately this is not allowed, is there any possibility without writing the key into the code?

1 Answer

0 votes
ago by SoSci Survey (351k points)

You could store the code in the database for contents.

From there, you can retrieve it via dbGet(), and then use it in the PHP code.

$data = dbGet('api-key');
$key = $data[0];

The function, you had probably looked for, was getTextElement().

As there has never been a function getText(), your question indicates that you may have asked ChatGPT or another tool for a solution instead of reading the manual. Know, that ChatGPT has not read the SoSci Survey manual, either. Therefore, ChatGPT is essentially just giving you hallucinations on how to use SoSci Survey. If you want to work with generative AI: Gemini at least knows the instructions for SoSci Survey. Please note, however, that even then the answers from generative AI are only correct with a chance of approx. 65%.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...