Thanks for the info, i was wondering how i would be able to go about creating the admin side of the system, how would the administrators be able to create new polls for the system. Thanks
Its easy to just be concerned about the database first, as this will store the polls.
First create the structure for your database. If you look at existing poll scripts, you can view the database structure using phpmyadmin.
The idea would be to save the info needed for each individual poll, and all the form fields on the poll.
You could store each poll in a table called 'polls' with the columns, id, title, description, creator, date, published etc etc.
This singles out each poll and also allows you to keep track of who created it and when (creator, date) and if its published or not and other optional features.
You can then create a table for all the poll's form fields called poll_fields.
First you will need to make sure the poll fields are linked to an existing poll, so you give it a table column called poll_id. This will have the value of one of the id's of the rows in the 'polls' table.
Its also good to have an index for your poll_fields table, so you can give it an id column also. (so you can identify each row on its own)
Then you can add another table column called form_field, this will hold your form fields. You can also add other colums like, field_type, field_description, field_length etc.
When you create a form fields, you can save each one into a different row in this table, but have the poll_id set to the same poll id.
So an example poll saved in the db would be:
Table: polls
id = 1, title = 'My first Poll', description = 'An example Poll', creator = 'myname', date='some_date', published='1'.
Table: poll_fields
id = 1, poll_id = 1, form_field = 'name', field_type = 'textbox', field_description = 'Fill in your Name';
id = 2, poll_id = 1, form_field = 'age', field_type = 'textbox', field_description = 'How Old Are You?';
id = 3, poll_id = 1, form_field = 'sex', field_type = 'textbox', field_description = 'Are you male or female?';
Now all you have to do is create the php pages that allow a admin to input this data into the db for each poll, and edit the data.
You'll notice that all the field_type's are textbox. Usually you will want textarea, selectbox etc. You can also add this, but you will need one more table to hold the options for a selectbox. Its just like the poll_fields except you link it to the poll_fields id, instead of the poll's id.
Hope that helps... :-|