Sabtu, 19 Oktober 2013

PHP Indonesia - Facebook: [ask] master master ane newbie mw nanyak nie skri...

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/ 
[ask] master master ane newbie mw nanyak nie skri...
Oct 19th 2013, 08:41, by Zohar Cie GoQhiels

Zohar Cie GoQhiels 8:41am Oct 19
[ask]

master master ane newbie
mw nanyak nie skrip login ane salah nya dmn ya gan knpa ane log in sebagai admin gag mw tapi kalau sebagai user dia mw gan
ini gan skrip login nya
<?php
session_start();
include"koneksi.php";
$input=mysql_query("select * from admin where user='".$_POST['user']."'and pass='".$_POST['pass']."'");
$hasil=mysql_fetch_array($input);
if($_POST['user']==""or $_POST['pass']=="")
{
header("location:salah_login.php");
} else
{ if($hasil['level']=='user') {
if($_POST['user']==$hasil['user'] and $_POST['pass']==$hasil['pass'])
{
$_SESSION['user'] = $hasil['user'];
$_SESSION['pass'] = $hasil['pass'];
header("location:halaman_user.php"); }
}
else if($hasil['level']=='admin')
{
if($_POST['user']==$hasil['user'] and $_POST['pass']==$hasil['pass'])
{
$_SESSION['user'] = $hasil['user'];
$_SESSION['pass'] = $hasil['pass'];
header("location:admin.php");
}
}
else
{
header("location:salah_login.php");
}
}
?>

Dwi Wahyu Setyawati 8:58am Oct 19
wew, banyak banget if nya ... logikanya kan bisa disederhanakan aja

Zohar Cie GoQhiels 9:13am Oct 19
tlong sederhanakan lah gan,,, alna ane pemula,,,,

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