Adding a poll

This is how to add a poll to the website.

1. Create the database, which are the poll answers. Insert the choices and grant permission for the user.

2. Two databases are created: polls and poll_answers. The fields are choice, activity, and votes.

3. Create the PHP routines to tabulate the votes, which go to showvotes.php.

4. Assign a numerical value to each variable.

5. Retrieve the number of votes for each choice and total number of votes cast, and run the query to get the choices and vote totals.

6. The results are outputted into a table.

7. Set aside a block of memory for the image.

8. Add an index to poll_answers to reference the question number.

9. Either set a cookie whenever a user casts a vote or log the IP address of each visitor.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License