title: Undefined variable on POST
body: <p>I looked trough your pages and fixed my undefined index on username and password but now I get undefined variable. I had more code but decided to simplify it for the sake of testing and just echo it to see if anything changes and it doesn't. </p>
  
  <pre><code>&lt;?php
  if (isset($_POST['submit'])){
  $uname = isset($_POST['username']);             
  $pass = isset($_POST['password']); 
  }
  
  echo $uname;
  echo $password;
  ?&gt;
  </code></pre>
  
  <p>I get this:</p>
  
  <blockquote>
    <p>Notice: Undefined variable: uname in C:\xampp\htdocs\8\login.php on line 7</p>
    
    <p>Notice: Undefined variable: pass in C:\xampp\htdocs\8\login.php on
    line 8</p>
  </blockquote>
  
  <p>I do not really understand what's wrong here. If needed here is my form page html.</p>
  
  <pre><code>&lt;form id="login" method="post" action="login.php"&gt;
  &lt;div id="loginon"&gt;
  &lt;label for="username" style="color:#0F0; font-family:Arial, Helvetica, sans-serif;" &gt;Username: &amp;nbsp; &amp;nbsp;&lt;/label&gt;
  &lt;input type="text" id="username" name="username" /&gt;
  &lt;br  /&gt;
  &lt;br  /&gt;
  
  &lt;label for="password"  style="color:#0F0; size:auto; font-family:Arial, Helvetica, sans-serif;"&gt;Password: &amp;nbsp; &amp;nbsp;&lt;/label&gt;
  &lt;input type="password" id="password" name="password" /&gt; 
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;input type="image" src="http://www.clker.com/cliparts/2/G/4/v/K/E/submit-hi.png" border="0" width="180px" height="80px" alt="Submit" /&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong>
  The further problem is connected to this so I think I am allowed to post it here.</p>
  
  <pre><code>if($username == "pikachu" || "cloud") {
      $ucheck = "dobar";
  } else {
      $ucheck = "los";
  }
  
  if ($password == "123123" || "132132") {
      $pcheck = "topar";
  } else {
      $pcheck = "losh";
  }
  
  if($ucheck == "dobar" &amp;&amp; $pcheck == "topar") {
      echo "Najjaci si!";
  
  }
  
  elseif ($ucheck == "dobar" &amp;&amp; $pcheck == "losh") {
      echo "Wimp.";
  } elseif ($ucheck == "los" &amp;&amp; $pcheck == "topar") {
      echo "Fish.";
  }
  </code></pre>
  
  <p>The problem is that it always echoes out "Najjaci si" no matter what I type in the previous form. Any ideas?</p>