title: Login without database using just PHP it's safe?
body: <p>i have made this simple login page without any database </p>
  
  <pre><code>&lt;?php session_start(); 
  if(isset($_POST['Submit'])){
  $logins = array('123' =&gt; '123');
  $Username = isset($_POST['Username']) ? $_POST['Username'] : '';
  $Password = isset($_POST['Password']) ? $_POST['Password'] : '';
  
  if (isset($logins[$Username]) &amp;&amp; $logins[$Username] == $Password){
  $_SESSION['UserData']['Username']=$logins[$Username];
  header("location:index.php");
  exit;
  } else {
  $msg="&lt;span style='color:red'&gt;Invalid Login Details&lt;/span&gt;";
  }
  }
  ?&gt;
  </code></pre>
  
  <p>html in the same page</p>
  
  <pre><code>&lt;form action="" method="post" name="Login_Form"&gt;
    &lt;table width="400" border="0" align="center" cellpadding="5" cellspacing="1" class="Table"&gt;
      &lt;?php if(isset($msg)){?&gt;
      &lt;tr&gt;
        &lt;td colspan="2" align="center" valign="top"&gt;&lt;?php echo $msg;?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php } ?&gt;
      &lt;tr&gt;
        &lt;td colspan="2" align="left" valign="top"&gt;&lt;h3&gt;Login&lt;/h3&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td align="right" valign="top"&gt;Username&lt;/td&gt;
        &lt;td&gt;&lt;input name="Username" type="text" class="Input"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td align="right"&gt;Password&lt;/td&gt;
        &lt;td&gt;&lt;input name="Password" type="password" class="Input"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt; &lt;/td&gt;
        &lt;td&gt;&lt;input name="Submit" type="submit" value="Login" class="Button3"&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>i want to know if this login page it's safe and hard to hack it !
  if you have any adea to secure this page login please give it to me 
  Thank you in advance</p>