Use PHP to do voting questions, examples

Source: Internet
Author: User

Requirements are like this, there is a topic, the title below is a check box, required to complete the check box after the submission will become a progress bar, the progress bar percentage of each option, and the number of votes

The first thing to do is to build two tables in the database, as follows:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/1050647/201612/ 1050647-20161229152457898-141281404.png "width=" 472 "height=" "style=" border:0px; "/>

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/1050647/201612/ 1050647-20161229152523898-2062577618.png "width=" 473 "height=" "style=" border:0px; "/>

To complete this topic, you need to build two pages

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" border:0px; "/>

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" border:0px; "/>

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" border:0px; "/>

<! doctype html public  "-//w3c//dtd xhtml 1.0 transitional//en"   "HTTP// Www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" border:0px; "/>

The code, like above, also has comments that run as a result:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/1050647/201612/ 1050647-20161229154359507-743128926.png "width=" 186 "height=" 179 "style=" border:0px; "/>

A progress bar appears when you select an item or a few clicks to vote

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/1050647/201612/ 1050647-20161229154555804-1494954007.png "width=" 198 "height=" 141 "style=" border:0px; "/>

Changes in the progress bar change with your options


Use PHP to do voting questions, examples

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.