Kamis, 25 Juli 2013

PHP Indonesia - Facebook: gan minta tolong donk ane bingung ni script ane ke...

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. NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
gan minta tolong donk ane bingung ni script ane ke...
Jul 25th 2013, 17:36, by Arista Nagato

Arista Nagato 5:36pm Jul 25
gan minta tolong donk ane bingung ni script ane kenapa ya kok gak mau jalan
kan alurnya gini pertama ketik no induk kemudian klik cari habis gitu akan muncul siapa pemilik no induk itu nah di situ kita bisa menghapus si pemilik no induk itu tapi sebelum di hapus kita di tampilkan biodata si pemilik setelah itu baru kita hapus

nah permasalahannya kenapa scriptku kok gak mau nampilin biodata si pemilik no induk itu ya
ni scriptnya

<body>
<?php
$induk=$_post['no_induk'];
//aku bingung di $_post['....']; di isi apa soanya nama textfield di cari.php itu namanya cari tapi primeriku namanya no_induk

include"koneksi.php";
//susun query
$query= "Select * from biodata where no_induk='$induk'";
// eksekusi query
$hasil=mysql_query($query)or die(mysql_error());
//cek hasil
if(mysql_num_rows($hasil)==0)//karena tanpa mendefinisikan $nama dll maka aku pake mysql_num_rows
{echo "<script>alert('Mungkin No Induk yang di maksud tidak ada');</script>";}
else
{$data=mysql_fetch_array($hasil);//karena pakai array maka terpaksa pakai indek kalo gak mau ya pake list(.....)
?><br />
</p>
<hr>
<table width="906" border="0">
<tr>
<td width="223">Nama</td>
<td width="673">:<?php echo "$data[0]"; ?> </td>
</tr>
<tr>
<td>Tempat Tanggal Lahir</td>
<td>:<?php echo "$data[1] $data[2] $data[3] $data[4]"; ?></td>
</tr>
<tr>
<td>Alamat</td>
<td>:<?php echo "$data[5]" ?></td>
</tr>
<tr>
<td>Kelas</td>
<td>:<?php echo "$data[6]" ?></td>
</tr>
<tr>
<td>No Induk </td>
<td>:<?php echo $data[7] ?></td>
</tr>
<tr>
<td>Password</td>
<td>:<?php echo $data[8] ?></td>
</tr>
<tr>
<td>Status Pembayaran </td>
<td>:<?php echo $data[9] ?></td>
</tr>
<tr>
<td>Foto </td>
<td>:<?php echo $data[10] ?></td>
</tr>

</table>
<form id="form1" name="form1" method="post" action="prosespenghapusan.php">
<label>
<input type="hidden" name="induk" value="<?php echo $data[7]?>" />
<input type="submit" name="Submit" value="Hapus" />
</label>
</form>

<?php
// tutup koneksi
mysql_close($koneksi);
}

?>
</body>
</html>

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