: 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"