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..
Silahkan login untuk menjawab!
1
Loading...
Ellyx Christian · Aug 1, 2011 · 1 Suka · 0 Tidak Suka
kamu lupa panggil function oci_execute fil file inputnilai2.php
$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);
oci_execute($sql); // kamu lupa ini
ocicommit($conn);

Untuk pertanyaan kamu cannot insert data to oracle database.., sudah ada butier yang mau bantu cara setting di xampp
0
Loading...
veetha · Aug 1, 2011 · 0 Suka · 0 Tidak Suka
makasich kak.. dah bisa... ^^ makasich banget kak...