When using this PHP code, I get the following error: Notice: Undefined index: error in C:\Apache24\htdocs\index.php on line 42
<?php
if ($error == 'true' && isset($error)) { //This is line 42
echo "<div><p>There was an error</p>
<p><img src=\"errorclose.png\"></p></div>";
};
?>
Funny enough, when $error is equal to true, however, the code works perfectly.
Why is the error occurring? Is there a syntax error?