Php-mysql Course

This is a Free Voting Script that allow users to vote Up /Down (Plus /Minus) on content, or to simple add and display points /votes for images, articles, videos, games, or any element in pages of your web site.
This Voting Script is made using Ajax technology, with JavaScript and PHP (with OOP), it can be included in any page (".html", or ".php"), but the server must run PHP.
The votes for each element are saved in a MySQL database, using MySQLi (or PDO).
The voted item, the number of the day, and the user (name or IP) are saved on the server, and cookies, so, the user can vote again the next day.
You can use the script to add rating system to one or more elements in a web page.
If you have a register /login script in your web site, you can set this Voting Script to allow only the logged users to vote. By default, all the visitors can vote an element once per day.
It has been tested successfully on Mozilla Firefox, Internet Explorer, Google Chrome and Opera.
- Details about Installation and Settings you'll find in a "readme.html" file, in the archive with the script.


• To Download it, click: Ajax-PHP Voting Script - Vote Up /Down.

Demo (here's an example with the three models of voting system that you can create with this script):
Free Vote Up /Down.
Vote Up /Down (or Plus /Minus), that shows Total Votes, and Current Rating. The vote can be Up (increase), or Down (decrease).
Free Up /Down Voting Script.
Up /Down (or Plus /Minus) vote system, that shows Current Rating, and the Number of Up and Down votes.
Simple Voting Script.
Simple vote to add /show points.

• To create a list which ranks the score of multiple voted items, based on highest score (or points), perform a MySQL Select in the "votitems" table. This table stores the voted items (in "id" column), Up votes (in "v_plus" column), and number of Down /Minus votes (in "v_minus" column).
Example:
SELECT id, (v_plus - v_minus) AS score FROM votitems ORDER BY score DESC LIMIT 10

• If you not put the "voting_mp" folder in the Root of your site, open the "voting.js" file (in "voting_mp" directory), and add the domain name to the value of the voting_mp variable; to use the absolute path.
Instead of:
var voting_mp ='/voting_mp/';
Edit to be:
var voting_mp ='http://domain_name/voting_mp/';

- Also, be sure to have in each page the correct path to the "voting.css", and "voting.js" files, included in the <head> area of the HTML code.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag defines the clickable areas inside the image map?
<map> <img> <area>
<img src="image.jpg" usemap="#map1">
<map name="map1">
  <area shape="rect" coords="9, 120, 56, 149" href="#">
  <area shape="rect" coords="100, 200, 156, 249" href="#">
</map>
Which CSS property defines what is done if the content in a box is too big for its defined space?
display overflow position
#id {
  overflow: auto;
}
Click on the event which is triggered when the mouse is positioned over an object.
onclick onmouseover onmouseout
document.getElementById("id").onmouseover = function(){
  document.write("Have Good Life");
}
Indicate the PHP variable that contains data added in URL address after the "?" character.
$_SESSION $_GET $_POST
if(isset($_GET["id"])) {
  echo $_GET["id"];
}
Ajax Voting Script - Vote Up Down

Last accessed pages

  1. JavaScript code and PHP (40616)
  2. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (137121)
  3. Node.js Course (2571)
  4. Animating in Flash - Frame-by-Frame Animation (2761)
  5. Get and change IFrame content through a JavaScript script created in another IFrame (16340)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (319)
  2. PHP Unzipper - Extract Zip, Rar Archives (110)
  3. Read Excel file data in PHP - PhpExcelReader (101)
  4. SHA1 Encrypt data in JavaScript (81)
  5. Get and Modify content of an Iframe (74)
Chat
Chat or leave a message for the other users
Full screenInchide