May I know what was your needs that required you to code your own survey?
It would have been a nightmare trying to do surveys on some home-brew web server survey system. I saw something similar happen once (study needed real-time tracking of user inputs to a degree which wasn't possible with other systems), and it involved a physical security audit of the server as well as university IT being involved. Project was delayed by a few months getting it through IRB.
For what it's worth, I found Qualtrics to be a a flexible, extendable platform for my unique survey needs. The study I was working on involved people comparing 3d models. Even though an STL viewer wasn't provided by Qualtrics, I was able to use an iframe to display the models in the survey.