title: If $_POST is empty
body: <p>i don't know What I'm doing wrong, I used first javascript for warning me that a text box is empty. Since that was bugging and wouldn't work for all text box. If tried with if isset $_POST['submit'], So when I Submit the form and I forgot to insert a title I should receive an error 'No title added'</p>
  
  <pre><code>&lt;?php
  // POST.PHP POSTING NEW CONTENT
  include 'config.php';
                              // values from form
                              if ($_SERVER['REQUEST_METHOD'] == 'POST') {
                              $id=$_POST['id'];
                              $title=$_POST['title'];
                              $pic=$_POST['pic'];
                              $youtube=$_POST['youtube'];
                              $cat=$_POST['cat'];
                              $NSFW=$_POST['NSFW'];
  
  
  
                              // insert data to mysql
                              $sql = "INSERT INTO post(id, title, pic, youtube, cat, NSFW)VALUES('$id', '$title', '$pic', '$youtube', '$cat', '$NSFW')";
                              $result=mysql_query($sql);
                              }
                              // succes added
                              if (isset($_POST['submit'])){
                              if($_POST['title']==""){
                              echo 'No title added'; }
                              if($_POST['pic']==""){
                              echo 'No image added.'; }
                              if($_POST['youtube']==""){
                              echo 'No youtube link added';}  
                              $id=$_POST['id'];
                              echo 'Yeah, buddy! Your content is added. Go to &lt;a href="/category.php"/&gt;CATEGORYS&lt;/a&gt;&lt;br&gt;';
                              }
  
  
  
                              // end of post script ^^
  ?&gt; 
  </code></pre>