MySQL databases, php forms, & dynamic results, oh my!

php survey

So when I first moved to Maryland I had several interviews going on in one week. One of the companies was looking for a web designer/developer so I thought I’d give it a try. For my interview they asked me to put together a page where someone can register/login, take a survey, and then produce live results once they hit submit. I suppose I should emphasize I’m more on the design than development side of things so this kind of frightened me (oh, and I had 1 day to put it together). After a few moments of wondering if I should cancel the interview I finally said to myself, why not take a stab at this, what’s the worst that could happen, you and they both realize it’s not the job for you and you’ve learned something new in the process. Click here to see it & try it out. :)

 

So after countless hours of doing research on setting up MySQL databases and php code for dynamic polls (and pulling out a few hair strands in the process), I actually managed to pull it off. It may not be the cleanest most hack-free membership/survey “site”…but for someone who went in days prior with little experience with php and almost zero with databases, I must say, I was quite proud. Now I can go in to my MySQL database and see that user Anna answered Sloth for question one and so did 5 other users. As lame as this may sound, it’s just cool the things you can do with a bit of code.
 
Just in case you’re curious what tutorials I used/referenced when creating this…
 
User Membership with PHP – Nettuts+
 
Creating a Dynamic Poll with jQuery and PHP – Nettuts+
 
How to Design and Create a PHP Powered Poll – CSS – Tricks
 
Learning SQL Using phpMyAdmin – php-editors