suttercain Posted May 6, 2007 Share Posted May 6, 2007 This one has me stuck... <?php $comp1 = 1; $comp2 = 1; if ($vbulletin->userinfo['usergroupid'] == '6' || $vbulletin->userinfo['usergroupid'] == '2') { if (!isset($_POST['submit'])) { voteNow(); } elseif (isset($_POST['submit']) && $comp1 == $comp2); { echo "Your vote has been counted."; } else { $rating = $_POST['rating']; $comic_id = $row['comic_id']; $sent = mysql_query ("INSERT INTO comicvote (rating, comic_id, userid) VALUES ('$rating', '$comic_id', '$userid')") or die(mysql_error()); voted (); } } ?> ERROR MESSAGE: Parse error: syntax error, unexpected T_ELSE in /home/superman/public_html/comics/comicvote.php on line 45 Am I not properly using the else statement? Link to comment https://forums.phpfreaks.com/topic/50208-else-statement-error/ Share on other sites More sharing options...
benjaminbeazy Posted May 6, 2007 Share Posted May 6, 2007 you have a semicolon at the end of this statement, shouldnt have one.... } elseif (isset($_POST['submit']) && $comp1 == $comp2); { Link to comment https://forums.phpfreaks.com/topic/50208-else-statement-error/#findComment-246473 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.