This is a Voting Poll Script, created with Ajax technology, JavaScript and PHP (with OOP).
The script is free, without any support or assistance. You can use it, modify, and publish it freely.


- The Voting Poll System has Admin control page. In the Admin page you can Add /Reset /Delete polls, see poll code (that must be added in web page), and poll data (started date-time, total number of votes, number of votes, percentages and last date-time voted of each poll item).
- The script can be used in ".html" and ".php" files, but the server must run PHP.
- Data can be saved in TXT files on the server (in JSON format), or in a MySQL database (with PHP PDO). By default, the script saves data in TXT files.
- Works also in browsers with JavaScript disabled.
- Can be added multiple Voting Polls in a web page.
- If you have a register /login script in your web site, you can set this Voting Poll System Script to allow only the logged users to vote. By default, each visitor can vote a poll a single time only.
- The script can be easily used /translated in other languages, without affecting the main code of the script. Supports diacritics and other characters specific to each language.
- The code is valid XHTML, and the poll elements are displayed relatively to browser resolution, and window size.

- The script contains two designs /styles for poll data displayed after voting (click on these images).
Voting Poll Style 1 Voting Poll Style 1

More details, instalation and settings in the "readme.html" file in the script.

• To Download it, click: PHP-Ajax Voting Poll System script.

Bellow you can see Demo with two polls.
To see and test the Admin Page of this Voting Poll System, click: Admin Page.
This poll can be voted a single time only.
Vote this poll, started in: 26-Feb-2013

What is your age?

Voting Poll 2

This poll can be voted one time each day.
Vote this poll, started in: 26-Feb-2013

What fruit did you eat today?

• If your site usses "https" protocol for the URL address of the page in which you add the Polls, open the "admin.php" file (in "vpoll/" directory), and replace 'http' with 'https' at line 5.

Daily Test with Code Example

Which attribute can be used to add CSS styles directly in the HTML tag?
type style class
<div style="width: 80%; border: 3px solid #888888;">Content</div>
Which CSS transform method distorts the HTML element in a given angle (including its content)?
translate() scale() skew()
#some_id {
  transform: skew(20deg, 25deg);
  -ms-transform: skew(20deg, 25deg);   /* IE 9 */
  -webkit-transform: skew(20deg, 25deg);   /* Safari and Chrome */
Click on the function which converts a Date object to a string.
indexOf() toString() getDate()
var rightnow = new Date();
alert( rightnow.toString() );
Which function applies a callback function to the elements of the given array?
array_merge() array_search() array_map()
$arr = arra("abc", "<p>xyz</p>", "<em>PHP</em>");
// apply the strip_tags() function to delete HTML tags from each array item
$arr = array_map("strip_tags", $arr);
Voting Poll System script PHP-AJAX

Last accessed pages

  1. PHP-MySQL free course, online tutorials PHP MySQL code (16495)
  2. Drag and Drop with jQuery UI (2542)
  3. CSS3 - new Background properties (300)
  4. Common PHP Errors and Solutions (2408)
  5. Shape Tween - Flash Animation (1404)

Top accessed pages

  1. PHP-MySQL free course, online tutorials PHP MySQL code (16495)
  2. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (16117)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (15444)
  4. Ajax-PHP Chat Script (13600)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (13583)