title: Embed Php in Html
body: <p>i have a code which checks if username and password match and exist in database, and i got an html document below it, which is the login form. The problem is if the user's login credentials are incorrect the statement <strong>Invalid credentials</strong> gets printed at top of the screen, I want it above the Username box in Html. Please help :)
      
  
  <pre><code>if($username == $dbUserName &amp;&amp; $password == $dbPassword) {
      $_SESSION['username'] = $username;
      $_SESSION['id'] = $userId;
      header('Location: user.php');
  } else {
      echo "&lt;b&gt;&lt;i&gt;Invalid credentials&lt;/i&gt;&lt;b&gt;";
  }
  </code></pre>