This question already has an answer here:
Please professional programmers in the house, what is wrong with this code?
I get this error whenever i try to run it.
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\a\go.php on line 8
The php code:
<?php
$term=$_POST['term'];
$level=$_POST['level'];
if (
$term = 'First';
$level='js1';
)
{
header("Location: result.php");
exit();
}
elseif (
$term = 'First';
$level='js2';
)
{
header("Location: result2.php");
exit();
}
else {
$error = "Entry is invalid";
}
?>
</div>