title: If $_POST is empty function
body: <p>I am creating a form where I am using $_POST php function.</p>
  
  <p>Here is how my form looks like.</p>
  
  <p><strong>form.php</strong></p>
  
  <pre><code>&lt;h1&gt;Songs Movies Form&lt;/h1&gt;
  &lt;hr /&gt;
  
  &lt;form action="songs-movies.php" method="post"&gt;
  
  Song Name:
  Enter Song Name: &lt;input type="text" name="SongName" size="25" /&gt;
  
  Enter Movie Name: &lt;input type="text" name="MovieName" size="25" /&gt;
  
  &lt;input type="submit" value="Submit" name="submit" /&gt;
  
  &lt;/form&gt;
  
  &lt;br /&gt;
  &lt;a href="/forms/"&gt;Back to Forms&lt;/a&gt;
  &lt;hr /&gt;
  </code></pre>
  
  <p>Now I want to display result of <strong>SongName</strong> and <strong>MovieName</strong>, so I used <strong>echo $_POST["SongName"];</strong> and <strong>echo $_POST["MovieName"];</strong> which generates the result perfectly.</p>
  
  <p>Now I want to put these values <strong>SongName</strong> and <strong>MovieName</strong> between the text/line/para in the result/output page and if the value of <strong>SongName</strong> or <strong>MovieName</strong> is empty then the result/output should not display that specific text/line/para where I have put those functions.</p>
  
  <p><strong>e.g.</strong></p>
  
  <hr>
  
  <p><strong>ABC Song</strong> is the popular Song of the <strong>XYZ Movie</strong>. The <strong>ABC Song</strong> of <strong>XYZ Movie</strong> is directed by PQR Director.</p>
  
  <hr>
  
  <p>Now you can see there are two sentences in the above Para. I want to put the function for the first sentence only when the field values of <strong>SongName</strong> and <strong>MovieName</strong> are empty then</p>
  
  <ul>
  <li>It should display the first sentence whether the field values of <strong>SongName</strong> and <strong>MovieName</strong> is empty or not i.e. <em>ABC Song is the popular Song of the XYZ Movie</em>. If the field values of <strong>SongName</strong> and <strong>MovieName</strong> are empty then it can leave blank space between them and I know it can be done through this function <strong>echo $_POST["SongName"];</strong>.</li>
  </ul>
  
  <p>BUT</p>
  
  <ul>
  <li>It should not display the first sentence line if the field values of <strong>SongName</strong> and <strong>MovieName</strong> are empty i.e. <em>The ABC Song of XYZ Movie is directed by PQR Director.</em></li>
  </ul>