PadheAngelAvatar border
TS
PadheAngel
ask tampilkan data dari oracle ke php
misi master2 mau nanya

\t\t\t<?php
\t\t\tinclude("oraconn.php");
\t\t\t$query="select kode_barang, nama_barang, harga, stok from barang order by kode_barang";
\t\t\t$statement=ociparse($c, $query);
\t\t\tociexecute($statement, OCI_DEFAULT);
\t\t\t?>
\t\t\t<table width='600' cellpadding='5' cellspacing='5' border="2">
\t\t\t<tr>
\t\t\t\t<th width="200">Kode Barang</th>
\t\t\t\t<th width="200">Nama Barang</th>
\t\t\t\t<th width="200">Harga</th>
\t\t\t\t<th width="200">Stok</th>
\t\t\t</tr>\t\t\t
\t\t\t<?php
\t\t\twhile($baris = oci_fetch_array($statement, OCI_BOTH))
\t\t\t{
\t\t\t?>
\t\t\t<tr>
\t\t\t\t<td><?php echo $baris['kode_barang']; ?></td>
\t\t\t\t<td><?php echo $baris['nama_barang']; ?></td>
\t\t\t\t<td><?php echo $baris['harga']; ?></td>
\t\t\t\t<td><?php echo $baris['stok']; ?></td>
\t\t\t</tr>
\t\t\t<?php
\t\t\t}
\t\t\t?>
\t\t\t</table>
\t\t\t
\t\t\t<?php
\t\t\tocifreestatement($statement);
\t\t\t?>

errornya Notice: Undefined index: kode_barang in C:\xampp\htdocs\xfunwater\databarang.php on line 66
\t
Notice: Undefined index: nama_barang in C:\xampp\htdocs\xfunwater\databarang.php on line 67
\t
Notice: Undefined index: harga in C:\xampp\htdocs\xfunwater\databarang.php on line 68
\t
Notice: Undefined index: stok in C:\xampp\htdocs\xfunwater\databarang.php on line 69

salah dmnnya ya master?thanks


udh selesai master2 smuanya, ternyata salahnya di
\t\t\t<tr>
\t\t\t\t<td><?php echo $baris['KODE_BARANG']; ?></td>
\t\t\t\t<td><?php echo $baris['NAMA_BARANG']; ?></td>
\t\t\t\t<td><?php echo $baris['HARGA']; ?></td>
\t\t\t\t<td><?php echo $baris['STOK']; ?></td>
\t\t\t</tr>
0
958
2
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Urutan
Terbaru
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan