/* If you want to add other options, you can add them directly Just go up */ }else{ $descArray=array(1=>"More information", 2=>"The webpage is more beautiful", 3 =>"No improvement", 4=>"Others" ); $poll_resultBarHeight = 9; // height in pixels of percentage bar in result table $poll_resultBarScale = 1; // scale of result bar (in multiples of 100 pixels) $poll_tableHeader="
Note: From the above we can see the basic process of the voting system: 1. Open the file to obtain the data into the array $curArray (if the file does not exist, initialize the array $curArray) 2. Calendar array , process the data to obtain the required value 3. Calculate the percentage, control the statistical bar image width 4. Save the data to "data.pol"
There is one thing to note here: The data.pol text file requires write permission.
http://www.bkjia.com/PHPjc/316996.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316996.htmlTechArticleBuilding a simple interactive website (5) 8. Voting system In many cases, we need to collect Internet users and netizens their opinions. For example: Comparison between the new version of the page and the old version of the page; for a certain thing...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn