Minggu, 22 September 2013

PHP Indonesia - Facebook: saya lagi belajar buat multi user sederhana ni, ni...

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/ 
Compare Hotels

Find great prices for amazing hotels wherever your next destination may be. It's simple to search 100+ sites at once!
From our sponsors
saya lagi belajar buat multi user sederhana ni, ni...
Sep 22nd 2013, 10:12, by Ardian Saputra

Ardian Saputra 10:12am Sep 22
saya lagi belajar buat multi user sederhana ni, ni file menu.php
<?php
session_start();
include "konek.php";

if ($_SESSION['level'] == "admin") {
header('location: coba1.php');


}
else if ($_SESSION['level'] == "user") {
header('location: coba1.php');
}
?>
nah yang saya pngin jika slah satu memenuhi maka redirect ke file halman masing2 user dan admin.. itu bagaimana ya caranya? saya dah coba itu tpi error terus. mhon pencerahan master

Candra Nur Ihsan 10:14am Sep 22
header('location: coba1.php'); <--sama semua

Adi Kurni Awan 10:15am Sep 22
format command if nya coba dicek lg

Gembel Berkelas 10:17am Sep 22
ane malah bingung, error na apa ???

Ardian Saputra 10:19am Sep 22
ni keterangan errornya Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\mhs\menu.php on line 11

Ardian Saputra 10:20am Sep 22
@candra nur ihsan maaf yg kedua itu shrusnya coba2.php,, hnya sbgai contoh aja mas

Shinigami Qiang 10:22am Sep 22
elseif

Ardian Saputra 10:24am Sep 22
owh iya benar mas.. ternyata slah pada else if yg shrusnya elseif.. terima kasih ya mas

Dzawa Telnet 10:24am Sep 22
coba gan else if ganti jadi elseif ;)

Ardian Saputra 10:27am Sep 22
iya udah saya ganti mas,, nah skg redirect ke file lain itu nti di header di tambahin kode sesion ga?

Dzawa Telnet 10:30am Sep 22
mending di header nya itu udh ada session start ..
jadi tinggal di include header file nya..

Firdaus Bahar 10:30am Sep 22
elseif nya disambung bro, terus klo g bisa redirect coba tambahin

<? ob_start();?> di paling atas script (sebelum tag html) dan

<? ob_flush(); ?> di paling bawah script (sesudah tag html)

klo ane sih gitu, ndak tau temen2 yang lain :D

Ardian Saputra 10:36am Sep 22
udah solved bro.. thx ya.

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