<?php $con = mysqli_connect("localhost", "root", "password007", "university portal"); if(isset($_POST['radio'])){ mysqli_query($con, "update candidate set Vote=Vote+1 where UserID=$_POST[radio]"); $insertGoTo = "Voting2.php"; header(sprintf("Location: %s", $insertGoTo)); } ?> <!doctype html> <meta charset="utf-8"> <title>Voting function preventBack(){window.history.forward();} setTimeout("preventBack()", 0); window.onunload = function() {null}; <div id="Holder"> <div id="Header"> <a href="Home.php"></a> </div> <div id="NavBar"> <ul> <li><a href="Home.php">Home</a></li> <li><a href="Login.php">Student Portal</a> <ul> <li><a href="Login.php">Login</a></li> <li><a href="Candidate%20Profile.php">Candidates Profile</a></li> </ul> </li> <li><a href="Admin.php">Admin</a></li> <li><a href="About%20Site.php">About Us</a> <ul> <li><a href="About%20Site.php">About Site</a></li> <li><a href="Contact%20Us.php">Contact Us</a></li> </ul> </li> </ul> </div> <div id="Content"> <div id="PageHeading"> <h1> </h1> <h1> </h1> <h1>President</h1> </div> <div id="ContentLeft"> <h2>Your Message Here</h2> <h6>Note: vote wisely, once you've voted you cannot go back.</h6> </div> <div id="ContentRight"> <table width="400" border="0" align="center"><tbody><tr><td> <table border="0" align="center"><tbody><tr><td><h6>For President</h6></td></tr></tbody></table></td></tr><tr><td> </td></tr><tr><td> <table width="397" border="0"><tbody><tr><td width="102"></td><td width="282"><h6> OBINNA DANIEL CHUKWUKA</h6></td></tr></tbody></table></td></tr><tr><td> </td></tr><tr><td> <table width="397" border="0"><tbody><tr><td width="101"></td><td width="286"><h6> ABUBAKA KAYODE </h6></td></tr></tbody></table></td></tr><tr><td> </td></tr><tr><td> <table border="0" align="center"><tbody><tr><td></td></tr></tbody></table></td></tr><tr><td> </td></tr></tbody></table> </div> </div> <div id="Footer"></div> </div> <p> </p> <?php mysql_free_result($voting); ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)