title: How to display text on dropdown select
body: <p>I'm trying to do something very simple in PHP, but keep getting an error message. Essentially, when someone selects "Cat", I want "Miaow" to appear.</p>
  
  <p>My idea was:</p>
  
  <pre><code>&lt;select name="demo"&gt;
    &lt;option value="Dog"&gt;Dog&lt;/option&gt;
    &lt;option value="Cat"&gt;Cat&lt;/option&gt;
    &lt;option value="Fish"&gt;Fish&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;?php if ($_POST['demo'] == 'Cat') { echo 'Miaow'; } ?&gt;
  </code></pre>
  
  <p>However, in PHPFiddle, </p>
  
  <blockquote>
    <p>I get 'E_NOTICE : type 8 -- Undefined index...'</p>
  </blockquote>
  
  <p>as soon as the code runs. Am I missing something basic? Thanks!</p>