title: How to add isset $ _GET Multiple Functions in PHP
body: <p>The code below always displays an error message:</p>
  
  <blockquote>
    <p><b>Notice:</b> Undefined index: p in <b>C:\xampp\htdocs\school\content.php</b> on line <b>2</b><BR/>
    <b>Notice:</b> Undefined index: p in <b>C:\xampp\htdocs\school\content.php</b> on line <b>2</b><BR/>
    <b>Notice:</b> Undefined index: p in <b>C:\xampp\htdocs\school\content.php</b> on line <b>6</b></p>
  </blockquote>
  
  <pre><code>&lt;?php
  
      if($_GET['p'] == "home" || !$_GET['p']){
          echo "&lt;title&gt;Welcome to Homepage&lt;/title&gt;";
      }elseif($_GET['p'] == "about"){
          echo "&lt;title&gt;ABOUT | $schoolname&lt;/title&gt;";
      }if($_GET['p'] == "contact"){
          echo "&lt;title&gt;CONTACT US | $schoolname&lt;/title&gt;";
      }
  
  ?&gt;</code></pre>
  
  <p>I added the isset, but does not work well. for the error message is gone, but ..</p>
  
  <pre><code>&lt;?php
  
      if(isset($_GET['p']) and $_GET['p'] == "home" || !isset($_GET['p']) and !$_GET['p'] ){
          echo "&lt;title&gt;Welcome to Homepage&lt;/title&gt;";
      }elseif(isset($_GET['p']) and $_GET['p'] == "about"){
          echo "&lt;title&gt;ABOUT | $schoolname&lt;/title&gt;";
      }if(isset($_GET['p']) and $_GET['p'] == "contact"){
          echo "&lt;title&gt;CONTACT US | $schoolname&lt;/title&gt;";
      }
  
  ?&gt;
  </code></pre>
  
  <p><br/>
  which appears in the title bar is <b>http: // localhost / school</b> ..
  I want like this, if it is on the homepage: "Welcome to Homepage".</p>
  
  <p>Thaanksss...</p>