Error of radio buttons
| From: | Remember14a at aol dot com | Date: | Sun, 19 Sep 2004 04:32:57 +0000 |
| Subject: | Error of radio buttons | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-36248@lists.php.net to get a copy of this message | ||
Dear Friends,
Want to get rid of this error, pasted below.
Line 19 comes at "else" statement.
Any guidance, please.
-----------------------------------------------------------------------
Parse error: parse error, unexpected T_ELSE in C:\HOME\doctorbush\quiz.php on
line 19
------------------------------------------------------
Php snippet
-----------------------------------------------------------------
<?php
$variable = $_POST['R'] ;
$secondvar = $_POST['q'] ;
$score = 0;
if ($variable == 3 OR $secondvar==4) ;
{
echo "$score+1";
}
else {
echo "$Score";
};
?>
-----------------------------------------------------------------------
html form code
---------------------------------------------------------------------
<html>
<head>
<title></title>
</head>
<body>
<form method="POST" action="quiz.php">
Q-1)Law of diminished return is ;<br>
<input type="radio" value="4" name="R">
Medical concept <BR>
<input type="radio" value="3" name="R">
Economic <BR>
<input type="radio" value="2" name="R"> Agriculture
<BR>
<input type="radio" value="1" name="R"> Computers
<BR>
<p>
Q-1)Federal fiscal deficit was maximum during ;<br>
<input type="radio" value="4" name="q">
President Eisenhover <BR>
<input type="radio" value="3" name="q">
President Nixon <BR>
<input type="radio" value="2" name="q">
President Ford <BR>
<input type="radio" value="1" name="q">
President keneddy <BR>
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="See Score">
</form></body>
</html>