title: Showing the last entered message
body: <p>I want to print the last message that was added to the db. I wanted to do this by print the last greatest id but it does not work. It doenst give me any errors and I cant figure out why it is not working.</p>
  
  <p>Maybe there is a logical error as I am pretty new to coding.</p>
  
  <pre><code>    &lt;?php
        $mysqli = new mysqli("localhost", "test", "test", "test");
        if ($mysqli-&gt;connect_errno) {
            echo "Failed to connect to MySQL: " . $mysqli-&gt;connect_error;
        }
  
        $res = $mysqli-&gt;query("SELECT message FROM guestbook WHERE MAX('id')");          
         print '&lt;div&gt;' . '&lt;p&gt;' . 'Inhalt ihrer Nachricht:' .'&lt;/p&gt;' . '&lt;/div&gt;';
         print '&lt;div id="textbox"&gt;' . '&lt;div class="guestcontent"&gt;' . '&lt;p&gt;' .  $res['message'] . '&lt;/p&gt;' . '&lt;/div&gt;' . '&lt;/div&gt;' . '&lt;br&gt;';
        ?&gt;
  </code></pre>