News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Developer Drive:
Creating a PHP User Survey Writing to Database Tables
November 22, 2011 @ 14:54:03

On Developer Drive today they've posted the most recent article in a tutorial series showing you how to create a user survey that stores the results to a database table. In this latest tutorial, they show how to hook the current code into a MySQL backend.

In the first two parts of this series, we created the data layer that will hold the polling data and established methods for setting the variable values and reading from the database tables. In this part, we will build the methods that will write new polls and answers to the tables.

They include the code for an "addPoll" method that inserts the questions and answers for the polls. Their "editPoll" method updates the poll questions/answers and the "addVote" method does exactly like it sounds - adding a vote to one of the poll options. Also included are "deletePoll", "activatePoll" and "deactivatePoll".

0 comments voice your opinion now!
tutorial database table poll survey answers questions


blog comments powered by Disqus

Similar Posts

DevShed: Finding Paths, Timestamps and More with the DirectoryIterator Class in PHP

Master Zend Framework: Running the ZF2Skeleton with PHP’s Built-in Webserver

EasyTech Blog: Executing PL/SQL code in Zend Framework

SitePoint PHP Blog: 6 Reasons to Move to Laravel Homestead

DevShed: Creating the Blog Script for a PHP/MySQL Blogging System (Part 2)


Community Events

Don't see your event here?
Let us know!


example conference php7 performance configure podcast introduction framework symfony2 laravel release composer voicesoftheelephpant series community library api interview opinion application

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework