Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: run php script on completion of a survey

Re: run php script on completion of a survey 1 year 6 months ago #93866

  • ivanleng
  • ivanleng's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
I need to do the same and use a PHP script at the end to send some stuff to an external web service.

I'm thinking about using PHP Session to store some values so they can be easily retrieved, this way my end URL won't be too long.
The administrator has disabled public write access.

Re: run php script on completion of a survey 1 year 6 months ago #94006

  • davyhp
  • davyhp's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
ivanleng wrote:
I need to do the same and use a PHP script at the end to send some stuff to an external web service.

I'm thinking about using PHP Session to store some values so they can be easily retrieved, this way my end URL won't be too long.

PHP Session would solve the backend problem, but I can't get a PHP script running from within the code of a survey question... Where else would I put my sessions' variables?

tpartner wrote:
<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

$.get('upload/templates/yourTemplateName/survey_end.php', { name: 'John Doe', age: '38' } );

});

</script>

That was the code submitted by tpartner, which isn't working for me inside a survey. Just JavaScript works fine, but the PHP script doesn't run like it does when I use the end URL feature.
Last Edit: 1 year 6 months ago by davyhp.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.092 seconds
Donation Image