title: php, mysql, "Else after while statement
body: <p>How can I write a  condition such that if the row wasn't found to  then do something?</p>
  
  <p>My code</p>
  
  <pre><code>$resultt = mysql_query("SELECT * FROM objednavky WHERE kdo = '$kdo' and kdy = '$the_rday'");
                          while ($roww = mysql_fetch_array($resultt)) {
  
                              echo "&lt;form method='post' action=''&gt;
                                    &lt;label for='obb1'&gt;Menu #1&amp;emsp;&lt;/label&gt;
                                    &lt;input type='text' name='obb1' value='$roww[3]' size='4'&gt;&lt;br&gt;
                                    &lt;label for='obb1'&gt;Menu #2&amp;emsp;&lt;/label&gt;
                                    &lt;input type='text' name='obb2' value='' size='4'&gt;&lt;br&gt;
                                    &lt;label for='obb1'&gt;Menu #3&amp;emsp;&lt;/label&gt;
                                    &lt;input type='text' name='obb3' value='' size='4'&gt;&lt;br&gt;
                                    &lt;input type='submit' value='objednat'&gt;&lt;/form&gt;";
  
  
                          }
  </code></pre>
  
  <p>And I want to continue like this</p>
  
  <pre><code>   ...} else {
  echo " no match ";
  }
  </code></pre>
  
  <p>Thank you so much for help.</p>