kak mw tanya... dimana saya bisa menemukan tutorial oracle dan php?
karena jujur saya masih bingung pemakaian oci_execute, oci_parse, ora..... function2 lainnya..

thanks
veetha

Lihat semua 1 jawaban

Silahkan login untuk menjawab!
kakak2 saya mau tanya lagi. sya punya script seperti ini
inputnilaipanitia
<?php
include ('koneksi.php');
if ($conn){
	$sqlstr ="select * from t_juri order by no_juri";
 $sql=ociparse($conn,$sqlstr);
	ociexecute($sql);
	}
?>
<?php
	include ('koneksi.php');
	$username=$HTTP_POST_VARS['username'];
	$tim_inovasi=$HTTP_POST_VARS['tim_inovasi'];
	$a=$HTTP_POST_VARS['a'];
	$b=$HTTP_POST_VARS['b'];
	$c=$HTTP_POST_VARS['c'];
	$d=$HTTP_POST_VARS['d'];
	$e=$HTTP_POST_VARS['e']; 
	$f=$HTTP_POST_VARS['f'];
	$g=$HTTP_POST_VARS['g'];
	$h=$HTTP_POST_VARS['h'];
	$i=$HTTP_POST_VARS['i'];
	$j=$HTTP_POST_VARS['j'];
	$k=$HTTP_POST_VARS['k'];
	$l=$HTTP_POST_VARS['l'];
	$m=$HTTP_POST_VARS['m']; 
	$n=$HTTP_POST_VARS['n'];
	$o=$HTTP_POST_VARS['o'];
?>
<form method="post" action="inputnilai2.php">
	 <table border="0">
	 <tr>
 <td width="247" height="24" bgcolor="#669933"><span class="style1">Nama Panitia </span>	</td>
 <td width="144" bgcolor="#669933"><input name="username" type="text" class="style1"/></td>
 </tr>
 <tr>
 <td width="247" height="24"><span class="style1">Nama Tim </span></td>
 <td width="144"><span class="style1">
 <select name="tim_inovasi">
 <option value="" selected="selected">_Tim_</option>
 <?php
	 include ('koneksi.php');
 
 	 $sql = "SELECT tim_inovasi FROM t_tim";
	 $hasil = ociparse($conn, $sql);
		 ociexecute($hasil);
		 ocicommit($conn);
 
 while ( ocifetchinto ($hasil,$tes,$i)!=null)
		 { 
		 $tim_inovasi = $tes[0];
			$nama_orang = $tes[1]; 
 
			print("<option value=\"$tim_inovasi\">$tim_inovasi</option>\n");
		 }	 
 ?> 
 </select>
 </span></td>
 </tr>
	 <tr>
 <td width="247" height="24" bgcolor="#669933"><span class="style1">Sesuai batas waktu 		terakhir diterima Panitia LKI </span></td>
 <td width="144" bgcolor="#669933"><select name="a" value="<?php echo $a ?>">
			<option> 0 </option>
			<option> 100 </option> </select>		</td>
 </tr>
 <tr>
 <td bgcolor="#669933"><span class="style1">Pengesahan Unit Pengirim </span></td>
 <td bgcolor="#669933"><select name="b" value="<?php echo $b ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
	 <tr>
 <td width="247" height="24"><span class="style1">Abstrak</span></td>
 <td width="144"><select name="c" value="<?php echo $c ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td bgcolor="#669933"><span class="style1">Latar Belakang </span></td>
 <td bgcolor="#669933"><select name="d" value="<?php echo $d ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td><span class="style1">Perumusan Masalah </span></td>
 <td><select name="e" value="<?php echo $e ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
	 <tr>
 <td bgcolor="#669933"><span class="style1">Maksud dan Tujuan </span></td>
 <td bgcolor="#669933"><select name="f" value="<?php echo $f ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td><span class="style1">Ruang lingkup </span></td>
 <td><select name="g" value="<?php echo $g ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
	 <tr>
 <td width="247" height="24" bgcolor="#669933"><span class="style1">Metodologi</span></td>
 <td width="144" bgcolor="#669933"><select name="h" value="<?php echo $h ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td><span class="style1">Landasan Teori </span></td>
 <td><select name="i" value="<?php echo $i ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td bgcolor="#669933"><span class="style1">Pembahasan inovasi </span></td>
 <td bgcolor="#669933"><select name="j" value="<?php echo $j ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
	 <tr>
 <td><span class="style1">Manfaat inovasi </span></td>
 <td><select name="k" value="<?php echo $k ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td bgcolor="#669933"><span class="style1">Analisa resiko</span></td>
 <td bgcolor="#669933"><select name="l" value="<?php echo $l ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td><span class="style1">Kesimpulan dan saran </span></td>
 <td><select name="m" value="<?php echo $m ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
	 <tr>
 <td width="247" height="24" bgcolor="#669933"><span class="style1">Daftar pustaka / Referensi </span></td>
 <td width="144" bgcolor="#669933"><select name="n" value="<?php echo $n ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td><span class="style1">Lampiran dan Biodata </span></td>
 <td><select name="o" value="<?php echo $o ?>">
			<option> 0 </option>
			<option> 100 </option> </select></td>
 </tr>
 <tr>
 <td><input name="submit" type="submit" class="button" value="Masukkan Data" />
 <input name="reset" type="reset" class="button" value="Reset" /></td>
 </tr>
	 </table>
</form>

inputnilai2.php
<?php
	include ('koneksi.php');
	$username=$HTTP_POST_VARS['username'];
	$tim_inovasi=$HTTP_POST_VARS['tim_inovasi'];
	$a=$HTTP_POST_VARS['a'];
	$b=$HTTP_POST_VARS['b'];
	$c=$HTTP_POST_VARS['c'];
	$d=$HTTP_POST_VARS['d'];
	$e=$HTTP_POST_VARS['e']; 
	$f=$HTTP_POST_VARS['f'];
	$g=$HTTP_POST_VARS['g'];
	$h=$HTTP_POST_VARS['h'];
	$i=$HTTP_POST_VARS['i'];
	$j=$HTTP_POST_VARS['j'];
	$k=$HTTP_POST_VARS['k'];
	$l=$HTTP_POST_VARS['l'];
	$m=$HTTP_POST_VARS['m']; 
	$n=$HTTP_POST_VARS['n'];
	$o=$HTTP_POST_VARS['o'];
	$total1 = "";
 	$total1 = $a*5/100 + $b*1/100 + $c*1/100 + $d*1/100 + $e*1/100 + $f*1/100 + $g*1/100 + 		$h*1/100 + $i*1/100 + $j*1/100 + $k*1/100 + $l*1/100 + $m*1/100 + $n*1/100 + $o*1/100;
 
	$query="insert into t_panitia (USERNAME, TIM_INOVASI, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, TOTAL1) values('$username', '$tim_inovasi', '$a', '$b', '$c', '$d', '$e', '$f', '$g', '$h', '$i', '$j', '$k', '$l', '$m', '$n', '$o', '$total1')";
	$sql=ociparse($conn,$query);
	ocicommit($conn);
	if ($sql) {
				echo "Nilai Berhasil di masukkan.";
				} 
				else 
				{ 
				echo "TIM sudah dinilai. Nilai TIM ini sudah ada dalam database.";
				}
?>

kkak yang aneh disini adalah dia dah muncul tulisan "nilai berhasil dimasukkan" tapi anehnya data yang kita masukkan pas kita cek di oraclenya itu belum masuk... saya bingung apa yang sallah... sya sudah tracking 1 per 1 tapi menurut saya tidak ada yang salah...slah dmana ya kak?

thanks
veetha..

Lihat semua 2 jawaban

Silahkan login untuk menjawab!
Mohon bantuannya mas ellyx saya kan mau buat transkip nilai
misal tabel sperti ini

nama_pelajaran semeseter nilai
matematika 1 7
fisika 1 6
b.inggris 1 8
fisika 3 8

nah gmn cara filternya supaya klo ada pelajaran yg di ulang seperti fisika yg ditampilkan yg terbaru mas...
mohon bantuanya mas...
terimakasih sebelumnya...

Lihat semua 5 jawaban

Silahkan login untuk menjawab!

validasi

k1dc00l · Jul 31, 2011
<?php
$jenis_surat=$_POST;
$index=$_POST;
$pengirim=$_POST;
$no_surat=$_POST;
$tanggal_surat=$_POST;
$kode=$_POST;
$perihal=$_POST;
$lampiran=$_POST;
$isi_ringkasan=$_POST;
$pengolah=$_POST;
$tanggal_diteruskan=$_POST;
$tanda_terima=$_POST;
$gambar=$_FILES;
if (!$index || !$pengirim ||!$no_surat ||!$tanggal_surat ||!$kode ||!$perihal||!$isi_ringkasan || !$pengolah ||$tanggal_diteruskan )
{ ?>
<p><form action="prosestambah.php" method="post" enctype="multipart/form-data">
<table border=0 width="100%" bgcolor="WHITE" align="center">
<tr>
<td colspan=6 align="center" bgcolor="#CCCCCC">&nbsp;</td>
</tr>
<tr>
<td width="15%">No Urut </td>
<td width="1%">:</td>
<td width="20%"><input type="text" name="no_urut" class="tb2" disabled="disabled"></td>
<td width="20%">Pengolah</td>
<td width="1%">:</td>
<td width="15%"><input type="text" name="pengolah" maxlength="40" size="20" class="tb2" value="<?php echo "$pengolah";?>"><br><?php
if (!$pengolah)
{echo "salah pengisian pengolah";}
?> </td></tr>
<tr>
<td>Jenis Surat </td>
<td>:</td>
<td><select name="jenis_surat" class="tb2">
<option value="sangat rahasia">Sangat Rahasia</option>
<option value="rahasia">Rahasia</option>
<option value="umum">Umum</option>
</select></td>
<td>Tanggal diteruskan </td>
<td>:</td>
<td><input type="text" name="tanggal_diteruskan" maxlength="40" size="20" class="tb2" value="<?php echo "$tanggal_diteruskan";?>">
<br><?php
if (!$tanggal_diteruskan)
{echo "salah pengisian tanggal diteruskan";}
?></td></tr>
<tr>
<td>No Surat </td>
<td>:</td>
<td><input type="text" name="no_surat" class="tb2" value="<?php echo "$no_surat";?>">
<br><?php
if (!$no_surat)
{echo "salah pengisian no surat";}
?></td>
<td>Tanda terima </td>
<td>:</td>
<td><select name="tanda_terima" class="tb2">
<option value="ya">Ya</option>
<option value="tidak">Tidak</option>
</select> </td>
</tr>
<tr>
<td>Kode Surat</td>
<td>:</td>
<td><input type="text" name="kode" class="tb2" value="<?php echo "$kode";?>">
<br><?php
if (!$kode)
{echo "salah pengisian kode";}
?></td>
<td>Scan</td>
<td>:</td>
<td><input type="file" name="gambar" class="tb2" >
</td>
</tr>
<tr>
<td>Index</td>
<td>:</td>
<td><input type="text" name="index" class="tb2" value="<?php echo "$index";?>">
<br><?php
if (!$index)
{echo "salah pengisian index";}
?></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Perihal</td>
<td>:</td>
<td><textarea name="perihal" style="resize:none" class="tb2" value="<?php echo "$perihal";?>"></textarea>
<br><?php
if (!$perihal)
{echo "salah pengisian perihal";}
?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Isi Ringkas</td>
<td>:</td>
<td><textarea name="isi_ringkasan" style="resize:none" class="tb2" value="<?php echo "$isi_ringkasan";?>"></textarea>
<br><?php
if (!$isi_ringkasan)
{echo "salah pengisian ringkasan";}
?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Pengirim</td>
<td>:</td>
<td><input type="text" name="pengirim" class="tb2" value="<?php echo "$pengirim";?>">
<br><?php
if (!$pengirim)
{echo "salah pengisian pengirim";}
?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp; </td></tr>
<tr>
<td>Tanggal Surat </td>
<td>:</td>
<td><input type="text" name="tanggal_surat" class="tb2" value="<?php echo "$tanggal_surat";?>">
<br><?php
if (!$tanggal_surat)
{echo "salah pengisian tanggal surat";}
?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp; </td></tr>

<tr>
<td>Lampiran</td>
<td>:</td>
<td><select name="lampiran" class="tb2" >
<option value="0">-</option><?php
for($a=1;$a<101;$a++){
echo ('<option value='.$a.'>'.$a.' </option>');
}
?>
</select></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp; </td></tr>
<tr align="center">
<td colspan="7" bgcolor="#CCCCCC"><center><input type="submit" name="btn_submit2" value="Buat">
<input type="reset" name="reset" value="Batal"></center></td>
</tr>
</table>
</form>
<?php
} // Pindah ke halaman gagallogin.php}
else
{
$link=koneksi_db();
$sql="INSERT INTO surat_masuk(`jenis_surat`,`index`,`pengirim`,`no_surat`,`tanggal_surat`,`kode`,`perihal`,`lampiran`,`isi_ringkasan`,`pengolah`,`tanggal_diteruskan`,`tanda_terima`,`gambar`)
VALUES ('$jenis_surat','$index','$pengirim','$no_surat','$tanggal_surat','$kode','$perihal','$lampiran','$isi_ringkasan','$pengolah','tanggal_diteruskan','$tanda_terima','NULL')";
$res=mysql_query($sql);
if($res){
header("Location:inputsuccess.php");
}
else{
echo "Data baru gagal disimpan dengan kesalahan ".mysql_error();
}
} ?>


mas saya tuh mau buat validasi,,,ini udah berhasil jadi ketika button ti klik tetapi tidak di inputkan apa2 akan keluar validasi tetapi ketika di inputkan jadi tidak mensave data ke database kenapa ya mas???

Lihat semua 2 jawaban

Silahkan login untuk menjawab!

Pagination

arif · Jul 31, 2011
Mas ellyx bantuin saya donk...binggung apa yg salah
codingnya ini
 if ($tipe==0)
{$query_cek2 = "SELECT nim_akhir FROM `mahasiswa` WHERE `nama_siswa` LIKE '%$cari%'";
$hasil_cek2 = mysql_query($query_cek2) or die("Gagal");
$data_cek2 = mysql_fetch_array($hasil_cek2);
$nim_cek2 = $data_cek2['nim_akhir'];
if(isset($nim_cek2))
	{?>
  <table width="300" border="0">     
    <?php
		$banyakData = $data_cek2[0];
		$page = isset($_GET['page']) ? $_GET['page'] : 1;
		$limit = 3;
		$mulai_dari = $limit * ($page - 1);	
		$query_nama = "SELECT *  FROM `mahasiswa` WHERE `nama_siswa` LIKE '%$cari%' LIMIT $mulai_dari, $limit";
		$hasil_nama = mysql_query($query_nama);
		while($row_nama = mysql_fetch_array($hasil_nama)or die (mysql_error()))
		{ ?>
     
  <tr>
  	<td width="210"><?php echo $row_nama['nama_siswa']; ?></td>
    <td width="80"><a href="lihat_datams_detail.php?nim_akhir=<?php echo $row_nama['nim_akhir']; ?>">Detail</a></td>
  </tr>
  <tr>
  	<td><?php echo $row_nama['nim_akhir']; ?></td>
  	<td><a href="edit_datams.php?nim_akhir=<?php echo $row_nama['nim_akhir']; ?>">Edit</a></td>
  </tr>
  <tr>
  	<td><?php echo $row_nama['angkatan']; ?></td>
    <td><a href="konfirmasi_hapus_datams.php?nim_akhir=<?php echo $row_nama['nim_akhir']; ?>">Hapus</a></td>
  </tr>
  <tr><td><?php echo $row_nama['konsentrasi']; ?></td><td>&nbsp;</td></tr><?php }?>
  </table>
  <?php $banyakHalaman = ceil($banyakData / $limit);
			echo 'Halaman: ';
			for($x = 1; $x <= $banyakHalaman; $x++){
 				if($page != $x)
 					{echo '[<a href="hasilcari_lihat_datams.php?page='.$x.'&cari='.$cari.'&tipe=0">'.$x.'</a>] ';}
			 	else
 					{echo "[$x] ";}}}
  else 
  {echo "<h2>Nama Tidak ditemukan</h2>";}}?>

yg saya bingung setelah while ditutup kq ga bisa nampilin apa2 lagi ya...
padahal saya mau buat paginationnya....
tolong bantuan nya ya mas ellyx

Lihat semua 4 jawaban

Silahkan login untuk menjawab!

tanya Lagi

ria · Jul 30, 2011
mas mau tanya cara input data, semisal gini :
form.php
<?
include "kon.php";

$query="select * from qmhs where NIMHS='".$_SESSION['NIMHS']."'";
		  $result=mysql_query($query);
		  $data=mysql_fetch_array($result); ?>
<form name="formkrs" method="POST" action="PROSES.PHP">
NIM:<input type="text" name="NIMHS" value="<?=$data['NIMHS'];?>" disabled="disabled">

<input name="kirim" type="submit"  value="INPUT"> &nbsp;
<input type="hidden" name="NIMHS" value="<?=$data['NIMHS'];?>">


proses.php
<?php
session_start();
include "kon.php";


$NIMHS =$_POST['NIMHS']; 

mysql_query("INSERT INTO krs (NIMHS) VALUES('$NIMHS')");

echo "berrrrr";
?>

ga jadi itu mas, gimana ?

Lihat semua 6 jawaban

Silahkan login untuk menjawab!