title: PHP: Check select value and textbox != NULL
body: <p>This might be a silly question but I've got brainfreeze right now..</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;b&gt;Comment&lt;/b&gt;&lt;br&gt;
  &lt;select name="text" id="text"&gt;
      &lt;option value=""&gt;Select a option&lt;/option&gt;
      &lt;option value="option1"&gt;Option 1&lt;/option&gt;
      &lt;option value="option2"&gt;Option 2&lt;/option&gt;
      &lt;option value="other"&gt;Other&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;div class="other box"&gt;
      &lt;b&gt;Comment 2&lt;/b&gt;&lt;br&gt;
      &lt;input type="text" name="own_text"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>If someone select value "other" from the select I also want to make sure the textbox (own_text) not are NULL, with PHP.</p>
  
  <p><strong>Tried</strong></p>
  
  <pre><code>if($_POST['text'] == "other" &amp;&amp; $_POST['own_text'] != "") {
      echo 'Go on';
  } else {
      echo 'You chose other but has not typed anything';
  }
  </code></pre>
  
  <p>With this code I've got the error message (You chose other but has not typed anything) even if I chose "option1" or "option2", why? If I chose "option1" or "option2" it shall tell me the other message (Go on).</p>
  
  <p>Thanks in advance! :)</p>
  
  <p><strong>Solution (thanks Olvathar)</strong></p>
  
  <pre><code>if($_POST['text'] != "other" || $_POST['own_text'] != "") {
      echo 'Go on';
  } else {
          echo 'You chose other but has not typed anything';
  }
  </code></pre>