What is the error of my code? : <p>Can anyone tell what is wrong with my coding? There is undefined variable on every "$current...". Why does it has error while when i click on the search button, the result come out in the table?</p>

<p><a href="http://i.stack.imgur.com/4fw26.jpg" rel="nofollow">Here is the error occur</a></p>

<pre><code>&lt;html&gt;
&lt;head&gt;&lt;title&gt;Search Book&lt;/title&gt;
&lt;link href="css/bootstrap.css" rel="stylesheet"&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="container" align="center"&gt;
&lt;div class="row"&gt;
&lt;div class="col-md-5"&gt;
&lt;form method="get" action="" class="form-horizontal" name="search"&gt;&lt;br&gt;
&lt;table border="0" bgcolor="#E0FFFF"&gt;

&lt;td&gt;&lt;h3&gt;Search Book By ISBN:&lt;/h3&gt;&lt;/td&gt;

&lt;div class="form-group"&gt;
      &lt;td&gt;&lt;input type="text" name="id" class="form-control" placeholder="eg: 978-0320037825"&gt;&lt;/td&gt;
      &lt;/div&gt;
      &lt;br/&gt;
      &lt;tr&gt;&lt;td&gt;&lt;center&gt;&lt;button type="submit" class="btn btn-success"&gt;Search&lt;/button&gt;&amp;nbsp;&lt;/center&gt;&lt;/td&gt;
      &lt;td&gt;&lt;a href="index.php"&gt;Back&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;
&lt;?php
if (isset($_GET['id']) !='')
{
    $id = $_GET['id'];
    $xml = simplexml_load_file("bookstore.xml");
    $notThere = True;
    foreach ($xml-&gt;children() as $book)
    {

            if ($book-&gt;isbn == $id)
            {
                    $currentisbn = $book-&gt;isbn;
                    $currenttitle = $book-&gt;title;
                    $currentfirstname = $book-&gt;firstname;
                    $currentlastname = $book-&gt;lastname;
                    $currentprice = $book-&gt;price;
                    $currentyear = $book-&gt;year;
                    $currentpublisher = $book-&gt;publisher;
                    $notThere = False;
            }


    }
    if($notThere)
            {
                echo "ISBN Does Not Exist!";
            }
}
?&gt;

&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;


&lt;html&gt;


&lt;form method="POST" action="" class="form-horizontal" name="delete"&gt;

  &lt;table width="600" bgcolor="#ffffff" border="1" cellpadding="8"&gt;

  &lt;tr colspan="2"&gt;&lt;h2&gt;Delete Book&lt;/h2&gt;&lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="150"&gt;ISBN&lt;/td&gt;
      &lt;td width="320"&gt;&lt;?php echo $currentisbn;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="150"&gt;Title&lt;/td&gt;
      &lt;td width="320"&gt;&lt;?php echo $currenttitle;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;First Name&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $currentfirstname;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Last Name&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $currentlastname;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="150"&gt;Price&lt;/td&gt;
      &lt;td width="320"&gt;&lt;?php echo $currentprice;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="150"&gt;Year&lt;/td&gt;
      &lt;td width="320"&gt;&lt;?php echo $currentyear;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width="150"&gt;Publisher&lt;/td&gt;
      &lt;td width="320"&gt;&lt;?php echo $currentpublisher;?&gt;&lt;/td&gt;
    &lt;/tr&gt;
      &lt;td colspan="2" align="center"&gt; &lt;input name="submit" type="submit" value="Delete"/&gt; &amp;nbsp;
      &lt;a class="btn btn-default" href="index.php" role="button"&gt;Home&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;


&lt;?php
if (isset($_GET['id'])!='' &amp;&amp; isset($_POST['submit'])!=''){
    $id = $_GET['id'];
    $success=False;

    $dom = new DOMDocument();
    $dom -&gt; load("bookstore.xml");
    $xpath = new DOMXpath($dom);
    $node = $xpath-&gt;query("//*[isbn='$id']");
    foreach ($node as $book) 
                {   
                    $book-&gt;parentNode-&gt;removeChild($book);
                    $success=True;
                } 

    if($success)
    {
        echo "&lt;h1 style='text-align: center;'&gt;Successfully Deleted!&lt;/h1&gt;";
    }

     $dom-&gt;save("bookstore.xml");

}
?&gt;  
&lt;script&gt;
function goBack() {
    window.history.back();
}
&lt;/script&gt;

&lt;/html&gt;
</code></pre>
