dongshu7162 2014-12-14 05:33
浏览 15

点击登录时禁止访问

i am trying to create a login page for a website..whenever i am clicking on Login it is giving this error

Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server error, please contact the webmaster. Error 403 localhost Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15

i have attached my code with this.

Login.php

<?php
     require 'connect.inc.php';
     require 'core.inc.php';
     include 'loginform.php';
 ?>

Loginform.php

<?php
if(isset($_POST['u_name'])&& isset($_POST['pass'])) {
    $u_name = $_POST['u_name'];
    $pass = $_POST['pass'];
    if(!empty($u_name)&&!empty($pass)) { 
        echo 'OK';
     }
    else {  
        echo 'Fields cannot be blank';
    }
} ?>

 <form action="<?php echo $currentfile;?>" method="POST">
     username: <input type="text" name="u_name">
     password : <input type="password" name="pass">
     <input type="submit" value="Login"></input>
 </form>
  • 写回答

0条回答 默认 最新

    报告相同问题?