网站功能中的兼容性问题

时间:2015-12-14 18:26:24

标签: php html login

我有一个基本的登录系统,当我在Mac上测试时它完全正常工作,但是当我的任何一个Windows用户尝试登录时,他们要么被重定向到登录系统的另一部分,甚至没有任何链接他们来自哪里的方式,或者他们只是得到一个白色的屏幕。

我的PHP是。 auth.php

<?php session_start(); /* Starts the session */

/* Check Login form submitted */    
if(isset($_POST['Submit'])){
    /* Define username and associated password array */
    $logins = array('ozzie' => 'savox555','devjacob' => '59NassauRoad','builer' => 'xntbuilderd');

    /* Check and assign submitted Username and Password to new variable     */
    $Username = isset($_POST['Username']) ? $_POST['Username'] : '';
    $Password = isset($_POST['Password']) ? $_POST['Password'] : '';

      /* Check Username and Password existence in defined array */      
      if (isset($logins[$Username]) && $logins[$Username] == $Password){
        /* Success: Set session variables and redirect to Protected */
        $_SESSION['UserData']['Username']=$logins[$Username];
        header("location:/upload/index.php");
        exit;
    } else {
        /*Unsuccessful attempt: Set error message */
        $msg="<span style='color:red'>Invalid Login Details</span>";
    }
}
?>

我的表格是:                          登录

    <link rel="stylesheet" href="css/style.css">




</head>

 <body>

 <body class="align">

 <div class="site__container">

 <div class="grid__container">

  <form action="http://xeonnetwork.net/upload/dev/auth.php"       method="post" class="form form--login"> 
                    <h2>Awww snap! Please login!</h2>
    <div class="form__field">
      <label class="fontawesome-user" for="login__username"><span class="hidden">Username</span></label>
      <input name="Username" type="text" class="form__input" placeholder="Username" required>
    </div>

    <div class="form__field">
      <label class="fontawesome-lock" for="login__password"><span class="hidden">Password</span></label>
      <input name="Password" type="password" class="form__input" placeholder="Password" required>
    </div>

    <div class="form__field">
      <input name="Submit" type="submit" value="Sign In">
    </div>

  </form>


 </div>

 </div>

</body>

0 个答案:

没有答案