Jump to content

ELSE statement error...


suttercain

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.