title: Problem in Fetching Table contents when adding rows in same table
body: <p>Im trying to write a function for adding category:</p>
  
  <pre><code>function addCategory() {
  $cname   = mysql_fix_string($_POST['cname']);
  $kabst   = mysql_fix_string($_POST['kabst']);
  $kselect = $_POST['kselect'];
  $kradio  = $_POST['kradio'];
  $ksubmit = $_POST['ksubmit'];
  $id         = $_POST['id'];
  if($ksubmit){
    $query = "INSERT INTO category  VALUES (' ', '{$cname}', '{$kabst}', {$kselect},    {$kradio}, ' ') "; 
    $result = mysql_query($query);
    if ($result) {
      echo "ok";
    }
    else{
     echo $query ;
   }
  }
   $text .= '&lt;div class="form"&gt;
          &lt;h2&gt;ADD new category&lt;/h2&gt;
           &lt;form action="?page=addCategory" method="post"&gt;
               &lt;ul&gt;
                   &lt;li&gt;&lt;label&gt;Category&lt;/label&gt;&lt;/li&gt;
                   &lt;li&gt;&lt;input name="cname" type="text" class="inp" /&gt;&lt;/li&gt;
                   &lt;li&gt;&lt;label&gt;Description&lt;/label&gt;&lt;/li&gt;
                   &lt;li&gt;&lt;textarea name="kabst" cols="40" rows="10" class="inx"&gt;&lt;/textarea&gt;&lt;/li&gt;
                   &lt;li&gt;Published:&lt;/li&gt;
                   &lt;li&gt;
                     &lt;select name="kselect"  class="ins"&gt;
                       &lt;option value="1"&gt;Active&lt;/option&gt;
                       &lt;option value="0"&gt;Passive&lt;/option&gt;
  
                     &lt;/select&gt;
                   &lt;/li&gt;
                       &lt;li&gt;Show in home page:&lt;/li&gt; 
                       &lt;li&gt;
                        &lt;input type="radio" name="kradio" value="1" /&gt; yes
                        &lt;input type="radio" name="kradio" value="0" /&gt; no
                       &lt;/li&gt;
                   &lt;li&gt;Subcategory of&lt;/li&gt;
                   &lt;li&gt;
                    &lt;select&gt;';
                      while ($row = mysql_fetch_assoc(mysql_query("SELECT * FROM category"))){
                      $text .= '&lt;option&gt;'.$row['name'].'&lt;/option&gt;';
                      }
                      $text .= '&lt;/select&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;input name="ksubmit" type="submit"  value="ekle" class="int"/&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/form&gt;
  ';
  
  return $text;}
  </code></pre>
  
  <p>And the error:</p>
  
  <pre><code>Fatal error: Maximum execution time of 30 seconds exceeded
  </code></pre>
  
  <p>What is wrong in my function?</p>