J
J
JoniSuper2018-09-08 18:17:55
PHP
JoniSuper, 2018-09-08 18:17:55

403 php error, what to do?

When creating the simplest form login, password with the base It 5b93e7e788a5e563299803.png5b93e7f0266a6636263337.png
gives errors, I can’t figure out what to do
Code:

<?php
require "dp.php";



$data = $_POST;
if( isset($data['do_login']))
{
  // code...
  //baza
  $errors = array();
  if( trim($data[' login ']) == '' )
  {
    $erros[] = 'Ведите логин!';
}
}
if( trim($data[' password ']) == '' )
{
  $erros[] = 'Ведите пароль!!';
}
if( empty($errors))
{
  //все ок
}else {
  echo '<div style="color: red;">' .array_shift($erros). '</div><hr>';
}
 ?>
<?php


 ?>

 <meta charset="utf-8">
 <form action="login.php>" method="POST">
   <p>
<p><strong>Ваш логин:</strong></p>
     <input type="text" name="login">
   </p>
   <p>
     <p><strong>Ваш пароль</strong>:</p>
     <input type="password" name="password">
</p>
<p>
  <button type="submit" name="do_login">Войти</button>
</p>
 </form>

How to fix?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question