<?php session_start();
$connect = new mysqli("127.0.0.1", "root", "", "test") 
$su = $connect->real_escape_string($_POST["u"]); // for ' or 1=1 or '    
$sp = $connect->real_escape_string($_POST["p"]);
// $result = $connect->query("select * from members where u='" . $su  ."' and p='" . $sp ."'");
$result = $connect->query("select * from members 
where u='" . $_POST["u"]  ."' and p='" . $_POST["p"] ."'");
if ($result >num_rows > 0) 
  if($row = $result- fetch_assoc()) {
    $ SESSION["u"]  = $row['u'];      
    $_SESSION "tid"]  = $row['tid'];
    $_SESSION["sid"]  = $row['sid'];
    $_SESSION "listmem"  = $row['listmem'];
    $_SERVER["addmem"]  = row['addmem'];
    $_session["updmem"]   $row['updmem'];  
  } }
  cho 'Signin : completely';
} else   echo 'Signin : fail';  }   
echo '<br/><a href=index.php>back</a>' ;
$connect->close(); 
include "keeplog.php"); ?>