Jumat, 26 Juli 2013

PHP Indonesia - Facebook: [ASK] Ini msalahnya dimana Master ? kok ngk mau En...

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 NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
[ASK] Ini msalahnya dimana Master ? kok ngk mau En...
Jul 27th 2013, 02:24, by Alex HidaYad

Alex HidaYad 2:24am Jul 27
[ASK]
Ini msalahnya dimana Master ? kok ngk mau Entry Data ?

<?php
include("koneksi.php");

if (isset ($_POST['submit'])){
$kode_film =$_POST['txtkode'];
$judul_film =$_POST['txtjudul'];
$jenis_film =$_POST['txtjenisfilm'];
$pemain =$_POST['txtpemain'];
$Sutradara =$_POST['txtsutradara'];

$tambah = mysql_query("INSERT INTO entrifilm VALUES('$kode_film','$judul_film','$jenis_film','$pemain','$Sutradara')");

if ($tambah) {
echo "<script>
a = alert('Entry Data Berhasil');
if (a==true) {
top.location.href=list.php
}
</script>";

} else {
echo "<script>alert('Entry Data Gagal');</script>";
}
}

?>

Dero Ricardo Izecson 2:26am Jul 27
coba pake ini if($tambah==1)

Alex HidaYad 2:28am Jul 27
ngk bisa bg . .

Ricky Wisnadri S. Kom 2:29am Jul 27
Gan coba script nya diubah menjadi gini dulu gan, biar ketahuan kenapa gagalnya.

$tambah = mysql_query("INSERT INTO entrifilm VALUES('$kode_film','$judul_film','$jenis_film','$pemain','$Sutradara')") or die(mysql_error());

Hand Excel 2:32am Jul 27
nggak maunya itu karna ada pesen error atau gmn?

Alex HidaYad 2:35am Jul 27
Ricky Wisnadri S. Kom tetap seperti semula.(ngk bisa juga)

Hand Excel ngk maunya , pas di Entri ngk ada pesan apa2, semua Text yg di Input kosong. dan link nya kesini

"http://localhost/tgs/entri.php?txtkode=&txtjudul=&txtjenisfilm=&txtpemain=&txtsutradara=&submit=SIMPAN"

Guntur Park'er 2:37am Jul 27
if($tambah){
echo "<script>alert('Data berhasil disimpan'),location.href='list.php'</script>";
}else{
echo "<script>alert('Data gagal disimpan')</script>";
}

Ricky Wisnadri S. Kom 2:38am Jul 27
Antu iyo hasilnya itu "Entry Data Gagal", nan alex pakai itu namonyo itu get method. sedankan di code alex mamakai post, maa kan biso didapet nilainyo itu ? ^_^

Apry Githu Adja 2:38am Jul 27
coba lihat script form ny,,,

Guntur Park'er 2:40am Jul 27
if($tambah==true)....

Ricky Wisnadri S. Kom 2:41am Jul 27
http://localhost/tgs/entri.php?txtkode=&txtjudul=&txtjenisfilm=&txtpemain=&txtsutradara=&submit=SIMPAN

link diateh itu caro ma ambiak nilainyo itu menggukan $_GET['namo_parameter_nyo'].

Alex HidaYad 2:42am Jul 27
Hahahaha .. mokaih yo Da.. alah bisa Diinput an da Ricky Wisnadri S. Kom :D

Ricky Wisnadri S. Kom 2:42am Jul 27
(Y)

Faza Maula 2:42am Jul 27
^udah kejawab atas ane :)

Alex HidaYad 2:43am Jul 27
hehe Iya bg :D

Sohib Gunawan 2:43am Jul 27
curiga di method form nya... get atau post????

Alex HidaYad 2:44am Jul 27
Iya bg Sohib Gunawan tadi salah di Method nya. hehe. harusnya pake "Get"

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