Kamis, 22 Agustus 2013

PHP Indonesia - Facebook: mas mau tanya : error : Warning: session_start() [...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Fun with Brazilian Portuguese

Learn the tips and tricks to speak colloquial Portuguese in a natural and confident manner. Enroll today for just $69!
From our sponsors
mas mau tanya : error : Warning: session_start() [...
Aug 22nd 2013, 21:41, by Kholisoh Imagination

Kholisoh Imagination 9:41pm Aug 22
mas mau tanya :
error :
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php:9) in C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php on line 34

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php:9) in C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php on line 34

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php:9) in C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php on line 51

<html>

<head>
<title></title>
</head>

<body>

<?php
include "cfg/konfigurasi.php";

function anti_injection($data){
$filter = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));
return $filter;
}

$namauser = anti_injection($_POST['idanda']);
$sandi = anti_injection(md5($_POST['katakunci']));

// pastikan username dan password adalah berupa huruf atau angka.
if (!ctype_alnum($namauser) OR !ctype_alnum($sandi))
{
header('location:index.php?aks=error1');
}
else
{
$login=mysql_query("SELECT * FROM usertoko WHERE id_user='$namauser' AND ksandi='$sandi'");
$ada=mysql_num_rows($login);
$r=mysql_fetch_array($login);

// Apabila username dan password ditemukan
if ($ada > 0)
{
session_start();

$_SESSION[iduser] = $r[id_user];
$_SESSION[nauser] = $r[nama_user];
$_SESSION[passuser] = $r[ksandi];
$_SESSION[idsesi] = $r[id_sesi];
$_SESSION[leveluser] = $r[level_user];
$_SESSION[kodeuser] = $r[opt_user];

$sid_lama = session_id();

session_regenerate_id();

$sid_baru = session_id();

mysql_query("UPDATE usertoko SET id_sesi='$sid_baru' WHERE id_user='$_SESSION[iduser]'");

header('location:meja.php');
}else{
header('location:index.php?aks=error1');
}
}
?>

</body>

</html>

Rasmus Lerdorf 9:51pm Aug 22
session_start taruh atas sndiri jdnya <?php session_start(); ?> <html>......

Kholisoh Imagination 9:56pm Aug 22
mas masih ada error disini: Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php on line 48

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php:12) in C:\xampp\htdocs\AplikasiKasirPHP\MYTOKOBYPHP\ceksan.php on line 54

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar