mattm1712 Posted November 7, 2011 Share Posted November 7, 2011 <form action='index.php' method='POST' enctype='multipart/form-dat'> <select name='votes'> <option>SEATOWN</option> <option>vote1</option> <option>vote2</option> <option>vote3</option> </select> <input type='submit' name='vote' value='Vote'> </form> <?php $vote=$_GET['votes']; if(isset($_POST['vote'])) { echo "voted"; echo $vote; } ?> why would this not echo out anything for $vote??? cheers matt Link to comment https://forums.phpfreaks.com/topic/250636-help-with-voting-system/ Share on other sites More sharing options...
php.ajax.coder Posted November 7, 2011 Share Posted November 7, 2011 You need to change the following lines $vote = $_GET['votes']; if(isset($_POST['vote'])){ echo "voted"; echo $vote; } to if(isset($_POST['votes'])){ $vote = $_POST['votes']; echo "Voted : " . $vote; } Haven't tested this but is should work Link to comment https://forums.phpfreaks.com/topic/250636-help-with-voting-system/#findComment-1285945 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.