Selasa, 20 Agustus 2013

PHP Indonesia - Facebook: [ASK] Saya mempunyai error code seperti ini "Notic...

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/ 
Start taking a college level music theory class today.

This beginner class is now accessible to aspiring musicians of all ages. Learn all of the basic concepts in an easy to follow manner.
From our sponsors
[ASK] Saya mempunyai error code seperti ini "Notic...
Aug 20th 2013, 15:06, by Steven Yones

Steven Yones 3:06pm Aug 20
[ASK] Saya mempunyai error code seperti ini "Notice: Undefined index: kelas in /var/www/intranet/core/check_data.php on line 7"

Dengan potongan Code sbb :

<?php
$pelajaran = $_POST['pelajaran'];
$kelas = $_POST['kelas'];
$campur = ("".$pelajaran."/".$kelas."");

$query=mysql_query( " SELECT * from guru WHERE kelas = '$campur' " ) ;
$mentok= mysql_fetch_array($query);
$kelas=$mentok['kelas];
?>

Kira2 dimana yah problemnya ? Mohon pencerahannya.Terimakasih om-om

Nur Hidayat 3:26pm Aug 20
karena di table "guru" tidak ada field "kelas"

Steven Yones 3:30pm Aug 20
line 7 nya : $kelas = $_POST['kelas'];

Nur Hidayat 3:32pm Aug 20
lha? itu mah line 2 >.<

Yoga Hapriana 3:33pm Aug 20
coba ganti pake ini:
$kelas = !empty($_POST['kelas']) ? $_POST['kelas'] : ""

Nur Hidayat 3:35pm Aug 20
dari potongan kode di atas, line 7 adalah
-----------------
$kelas=$mentok['kelas];

Steven Yones 3:39pm Aug 20
$kelas = !empty($_POST['kelas']) ? $_POST['kelas'] : ""; begitu mas ?

Yoga Hapriana 3:39pm Aug 20
iyah coba aja, kalo salah berarti bukan disitu masalahnya :v

Steven Yones 3:43pm Aug 20
hehehe, masih error mas

Yoga Hapriana 3:44pm Aug 20
errornya masih sama?

Nur Hidayat 3:44pm Aug 20
kan sudah saya bilangin, itu line 2 bukan line 7 >.<

Yoga Hapriana 3:45pm Aug 20
oh iyah hahahaha :v

Nur Hidayat 3:45pm Aug 20
ckckck :v

Yoga Hapriana 3:46pm Aug 20
mungkin gini yah
$kelas = !empty($mentok['kelas']) ? $mentok['kelas'] : "";

atau masih salah?

Yoga Hapriana 3:47pm Aug 20
oh yah lagian itu kelasnya gak ditutup pake tanda petik $mentok['kelas] ... bukannya $mentok['kelas'] yah

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