i would like to insert a javascript form on the endpage, where the participant can insert his contact details to get the results of the studie later. It would not be a good idea to store these "answers" in the database because this would be a failure for the anonymity.
My procedure till now:
- javascript in the "end message" field:
... [creating the form] ...
... $.get("sendform.php") ... //to execute the programmed php file
- sendform.php:
mail(
"some@you.com",
"Test",
"Message"
) or die("Unable to send mail.")
If I call the sendform.php I get the die-message. Here I stuck.
May it be possible, that I have to include the smtp setting? How can I do this?
That's a quite good idea and a workable solution for me. I missed the forest by the java-trees. Thanks.
Only the fact that the link of the second survey is known by the participant and can be spread to others. So someone can enter the "I would like to have the results of the study" even then he didn't participated.
But that's okay for this scenario.