2016-04-20 129 views

回答

1

嘗試把它添加到這個..

<?php 
     session_start(); //Transfer the session_start() here .. 
     require("api/api.php"); 
     if(isset($_POST['username'])) 
     { 
      if(login($_POST['username'], $_POST['password'])) 
      { 
       $_SESSION['username'] = $_POST['username']; 
      } 
      else 
      { 
       echo 'Invalid username/password'; 
      } 
     } 
     require("header.php"); 
?>