Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\kntl\panel\pages\um\um412_func_inc_v.03_add2.php:633) in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 33
Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\kntl\panel\pages\um\um412_func_inc_v.03_add2.php:633) in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\kntl\panel\pages\um\um412_func_inc_v.03_add2.php:633) in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 35
Notice: Undefined index: ubkuser in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 36
Notice: Undefined index: ubklogin in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 37
Notice: Undefined index: ubktahun in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 38 SMK NEGERI 25 Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\kntl\panel\pages\um\um412_func_inc_v.03_add2.php:633) in E:\xampp\htdocs\kntl\panel\pages\ceklogin.php on line 49
the code
<?php
if(isset($_POST['userz'], $_POST['passz'])) {
        include "../../config/server.php";
        require("../../config/fungsi_thn.php");     
    $libpath1="up/";
    $js_path="um/";
    $um_path="um/";
    $docroot="";
    $toroot="";
    include_once $um_path."um412_func_inc_v.03.php";
    include_once $um_path."um412_func_inc_v.03_add2.php";   
        $userz = mysql_real_escape_string($_REQUEST['userz']);
        $passz = mysql_real_escape_string($_REQUEST['passz']);
        $passz = md5($passz);
        $loginz = mysql_real_escape_string($_REQUEST['login']);
        if($loginz == "admin"){$peran = "1";} else {$peran="0";}
        $sq="select * from cbt_user where Username = '$userz' and Password = '$passz' and login = '$peran'";
        echo $sq;
        $hs=mysql_query($sq);
        $sqladmin = mysql_num_rows($hs);
     //exit;
        if($sqladmin>0){
                    //if(!isset($_COOKIE['ubkuser'], $_COOKIE['ubklogin'])){
        $sqltahun = mysql_query("select * from cbt_setid where XStatus = '1'");
        $st = mysql_fetch_array($sqltahun);
        $tahunz = $st['XKodeAY'];
                        setcookie('ubkuser',$userz);
                        setcookie('ubklogin',$loginz);
                        setcookie('ubktahun',$tahunz);
                        $_COOKIE['ubkuser']==$userz;
                        $_COOKIE['ubklogin']==$loginz;
                        $_COOKIE['ubktahun']==$tahunz;      
                        //setting namauser
                        $namasek=carifield("select xsekolah from cbt_admin");
                        extractRecord($sq);
                        echo $Nama;
                        //exit;
                        if ($namasek!=$Nama) {
                            mysql_query("update cbt_admin set xsekolah='$Nama'");
                            //exit;
                        }
                        header("Location: ../pages/?");
                    //}
        } else { header("Location: login.php"); }
} else {
    header("Location: login.php");
}
?>
 
     
    