Simple online voting system php -- publish the voting page

Source: Internet
Author: User
: This article mainly introduces the simple online voting system php-publish the voting page. For more information about PHP tutorials, see. The Publish page can only be performed when a user logs on. Therefore, you must first check whether the user is logged on and then confirm whether the user is allowed to vote for publishing.

 
  
  
  • Note: Once published, it cannot be modified!

  • The information entered by the user is published to the background in post format.

     = $ Min & $ vname! = "") {For ($ I = 1; $ I <$ itemcount; $ I ++) {$ j = $ I + 1; $ item = $ item. '*'. @ $ _ POST [$ j]; $ num = $ num. '* 0';} $ sql3 = "SELECT uid FROM users WHERE username =' $ ouser'"; $ getVid = mysql_query ($ sql3 ); $ row = mysql_fetch_row ($ getVid); $ uid = $ row [0]; $ SQL = "insert into vote (vname, starttime, uid, vintro, open, more, max, min) value ('$ vname',' $ starttime', '$ uid',' $ vintro ',' $ open', '$ more', '$ max ', '$ min') "; mysql_query ($ SQL); $ sql2 =" SELECT vid FROM vote WHERE vname =' $ vname' "; $ getVid = mysql_query ($ sql2 ); $ row = mysql_fetch_row ($ getVid); $ vid = $ row [0]; $ sql4 = "insert into votetitle (vid, itemcount, item, num) value ('$ vid',' $ itemcount ',' $ item', '$ num') "; mysql_query ($ sql4); echo"

    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.