title: how to give a if else here
body: <p>i want to include a else statement after the completion of the block after the second if for category equal to helathcare ....now i want another else for finance but i am not getting where excatly to place that else 
  i have a confusion on where to keep the else for finance and 2 more categories 
  now whenever i try to place the one else at the last goes unrecable to its if statement i donno its very confusing as to where to place 2 more else if statments for 2 more categories </p>
  
  <pre><code>&lt;?php
  global $row2;
  if(isset($_POST['category']))
  {
              if($_POST['category']== 'Healthcare')
              {
  
              $query = "select *from event where category = 'Healthcare';";
              $result=mysqli_query($conn,$query)or die(mysqli_error($conn));
               while($row2= mysqli_fetch_array($result)) 
               {
              ?&gt;
      &lt;div class="events events-full event-list"&gt;
        &lt;div class="container"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-9 col-sm-8"&gt; 
              &lt;!--Blog Post Start--&gt;
              &lt;div class="blog-post"&gt;
                &lt;div class="post-thumb"&gt;
                  &lt;div class="link-wrap"&gt; &lt;a href="#"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;i class="fa fa-link"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/div&gt;
                  &lt;img src="images/gallery/&lt;?php echo $row2['event_image']?&gt;" alt='user'&gt;&lt;/div&gt;
                &lt;div class="event-text"&gt;
                  &lt;div class="event-counter"&gt;&lt;/div&gt;
                  &lt;h4&gt; &lt;a href="#"&gt;&lt;?php echo($row2['title']); ?&gt;&lt;/a&gt; &lt;/h4&gt;
                  &lt;p&gt;&lt;?php echo($row2['descrption']); ?&gt;&lt;/p&gt;
                  &lt;p&gt;&lt;span class="glyphicon glyphicon-map-marker"&gt;&lt;?php echo($row2['location']); ?&gt;&lt;/span&gt;&lt;/p&gt;
                  &lt;p&gt;&lt;span class="glyphicon glyphicon-grain"&gt;&lt;?php echo($row2['organizer']); ?&gt;&lt;/span&gt;&lt;/p&gt;
                  &lt;a class="nd" href=""&gt;
                    &lt;form action="eventdetail.php" method="post"&gt;
  
  &lt;input type='hidden' value="&lt;?php echo $row2['id']; ?&gt;" name='id'/&gt;
  
  
  &lt;button type="submit" class="btn btn-primary" name="detail" value=”detail”&gt;Event Detail&lt;/button&gt;
              &lt;/div&gt;
                  &lt;/a&gt; &lt;/div&gt;
              &lt;/div&gt;
            &lt;/form&gt;
  
              &lt;!--Blog Post End--&gt;
    &lt;?php } 
  
  
  
  
  
  
  
  
  }
  
  
  
  
  }
  
          else
          {
  
  
                global $row2;
              $query = "select *from event;"  ;
              $result=mysqli_query($conn,$query)or die(mysqli_error($conn));
               while($row2= mysqli_fetch_array($result)) 
               {
              ?&gt;
      &lt;div class="events events-full event-list"&gt;
        &lt;div class="container"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-9 col-sm-8"&gt; 
              &lt;!--Blog Post Start--&gt;
              &lt;div class="blog-post"&gt;
                &lt;div class="post-thumb"&gt;
                  &lt;div class="link-wrap"&gt; &lt;a href="#"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;i class="fa fa-link"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/div&gt;
                  &lt;img src="images/gallery/&lt;?php echo $row2['event_image']?&gt;" alt='user'&gt;&lt;/div&gt;
                &lt;div class="event-text"&gt;
                  &lt;div class="event-counter"&gt;&lt;/div&gt;
                  &lt;h4&gt; &lt;a href="#"&gt;&lt;?php echo($row2['title']); ?&gt;&lt;/a&gt; &lt;/h4&gt;
                  &lt;p&gt;&lt;?php echo($row2['descrption']); ?&gt;&lt;/p&gt;
                  &lt;p&gt;&lt;span class="glyphicon glyphicon-map-marker"&gt;&lt;?php echo($row2['location']); ?&gt;&lt;/span&gt;&lt;/p&gt;
                  &lt;p&gt;&lt;span class="glyphicon glyphicon-grain"&gt;&lt;?php echo($row2['organizer']); ?&gt;&lt;/span&gt;&lt;/p&gt;
                  &lt;a class="nd" href=""&gt;
                    &lt;form action="eventdetail.php" method="post"&gt;
  
  &lt;input type='hidden' value="&lt;?php echo $row2['id']; ?&gt;" name='id'/&gt;
  
  
  &lt;button type="submit" class="btn btn-primary" name="detail" value=”detail”&gt;Event Detail&lt;/button&gt;
              &lt;/div&gt;
                  &lt;/a&gt; &lt;/div&gt;
              &lt;/div&gt;
            &lt;/form&gt;
  
              &lt;!--Blog Post End--&gt;
              &lt;?php  } } ?&gt;
  
         ?&gt;
  </code></pre>