Search code examples
phpmysqlsurvey

submitting form data to mysql one question at a time


I have a simple survey here: access.mwjt.co.uk/feedback where have only 1 question displayed at once - I'd like to submit answers to mysql individually and then post a time stamp to mark survey complete on the final one. These are tracked with a unique ID.

I've used a href link and GET to cycle the questions, but I cannot for the life of me figure out how to submit the form without writing ALL the data (survey ID, question ID, user ID, question type, answer, comment) into the URL (i.e. ?s=blah&q=blah etc)

Please can someone enlighten me on how to submit survey data using a text link (javascript?)


Solution

  • Ended up setting a unique ID for the survey and submitting the results for each question using GET - makes the URL long, but works fine!