Pass the user ID on to another php script

More
5 years 4 months ago #71630 by audiolime
audiolime created the topic: Pass the user ID on to another php script
Hi all,

I am trying to pass on the user ID that limesurvey generates to another php script. I managed to display the User ID in a boilerplate question using {SAVEDID}, but I don't know how to make that variable usable for another php script.

A little background information: I managed to integrate an applet called NanoGong that participants use to record themselves with. Now I need to store the files this applet is creating under meaningful names to match the files and the responses these participants gave on limesurvey.

I would greatly appreciate any advice on how this could be done!
Esther

Please Log in to join the conversation.

More
5 years 4 months ago #71662 by tpartner
tpartner replied the topic: Pass the user ID on to another php script
1) You could try appending the {SAVEDID} as a parameter to the End URL .

2) You can use the jQuery.get() function to call a remote PHP file. Here is an example - www.limesurvey.org/en/forum/can-i-do-thi...on-of-a-survey#55975 .

3) If you need more functionality that the .get() function, see the jQuery.ajax() function - api.jquery.com/jQuery.ajax/

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 4 months ago #71750 by audiolime
audiolime replied the topic: Pass the user ID on to another php script
Thank you very much for your advice! Do you know the placeholder for the question ID? I would like to store the files under [userID]_[questionID].wav

Please Log in to join the conversation.

More
5 years 4 months ago #71757 by TMSWhite
TMSWhite replied the topic: Pass the user ID on to another php script
{QID}, which is available in 1.92 and 2.0

Please Log in to join the conversation.

More
5 years 4 months ago #71785 by tpartner
tpartner replied the topic: Pass the user ID on to another php script
As far as I know, {QID}is not available in the current stable version. You will need to use JavaScfript to find it.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 4 months ago #71858 by TMSWhite
TMSWhite replied the topic: Pass the user ID on to another php script
Correct, {QID} isn't available in 1.91+

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now