Jumat, 18 Oktober 2013

PHP Indonesia - Facebook: para suhu, mohon bantuannya :D gimana ya caranya w...

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 Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Mobile Game Development Course

Learn how to create awesome HTML5 games that run on iPhone, iPad, Android and Desktop! Sign up today for this $99 online course.
From our sponsors
para suhu, mohon bantuannya :D gimana ya caranya w...
Oct 18th 2013, 12:32, by Okto Alhamda Putra

Okto Alhamda Putra 12:32pm Oct 18
para suhu, mohon bantuannya :D
gimana ya caranya walaupun inputan ke dua, nilai bulan itu tetap terurut
setelah 6 (inputan pertama), berlanjut ke 7, 8, 9, 10 11 (inputan ke-2).
bukan mengulang nilai 1, 2, 3, 4, 5 lagi. makasih :)

Prayoga Wicaksono 12:36pm Oct 18
data bulan itu hasil inputan ato apa?

Abu Unaisah Setianto 12:36pm Oct 18
insert bulan seperti apa om?

Heru Rahmat Akhnuari 12:39pm Oct 18
di count lalu di loop :D

Okto Alhamda Putra 12:42pm Oct 18
iya itu yang berwarna biru, inputan secara simultan (inputan pertama). sedangkan
yang berwarna merah inputan secara simultan (inputan yang ke-2)
nah masalahnya, nilai yang berwarna merah itu mengulang lagi ke angka 1,
yang saya mau itu tidak mengulang ke angka 1, tapi yang saya mau itu berlanjut ke nilai {7, 8, 9, 10, 11}
tolong ya para suhu, :)

Prayoga Wicaksono 12:45pm Oct 18
setting increment aja di field bulannya

Abu Unaisah Setianto 12:47pm Oct 18
bingung juga, script-nya deh om

Okto Alhamda Putra 12:57pm Oct 18
ketika saya delete from table, dan saya input lagi, nilai nya pasti dimulai angka {12, 13, 14, 15}, ayo dong dibantu :D

Happy Coding 1:16pm Oct 18
kalo mau di akali sja mas Okto. kal bolh lht sciptx dul

Okto Alhamda Putra 1:18pm Oct 18
for ($i=1; $i<=12; $i++)
{
$Y_jumlah = $_POST['Y_jumlah'.$i];
$kode_merek = $_POST['kode_merek'];
$kode_tahun = $_POST['kode_tahun'];
$bulan = $_POST['bulan'.$i];
$waktu= $bulan.$tahun;
$XY=$i*$Y_jumlah;
$X2=$i*$i;
// ini langsung masuk ke table
$input_data_1 = "INSERT INTO tbl_input_data (kode_merek,kode_tahun,bulan,Y_jumlah,XY,X2) VALUES ('$kode_merek','$kode_tahun','$bulan','$Y_jumlah','$XY','$X2')";
}

Okto Alhamda Putra 1:21pm Oct 18
//jadi ini kodingin inputannya,
for ($i=1; $i<=12; $i++)
{
echo"
<td><input type=hidden size=5 name='bulan".$i."' value=".$i."></td>";
}

Happy Coding 1:28pm Oct 18
coba mas pakek query 'mysql_num_rows'

Happy Coding 1:29pm Oct 18
disna kan nama tabelx tbl_input_data nah mas select dulu tabelx nanti habis di slect mas hitung jumlah barisx. setelh ktemu jumlah barisx pada $bulan=$jumlah_baris+1;

Happy Coding 1:30pm Oct 18
ndak perlu post inputan

Okto Alhamda Putra 1:32pm Oct 18
minta dong suhu, kodingnya :D

Happy Coding 1:43pm Oct 18
ntar ane coba buatin dul. tungg bentar ya

Okto Alhamda Putra 1:43pm Oct 18
oke siap :)

Happy Coding 2:04pm Oct 18
coba kembangin yg in gan <?php
$koneksi= mysql_connect('localhost', 'root','');
mysql_select_db('contoh');

$qry_show= mysql_query("SELECT * FROM input_data");
$jumlah= mysql_num_rows($qry_show);
echo $jumlah;
if(isset($_POST['simpan'])){
$bln=$jumlah+1;
$thn=$_POST['kode_tahun'];

$insert= mysql_query("insert into input_data (bulan,kode_tahun) values ('$bln','$thn')");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form name="tes" action="" method="post">
kode tahun<br/>
<input type="text" name="kode_tahun"/>
<input type="submit" name="simpan" value="Simpan"/>
</form>
</body>
</html>

Okto Alhamda Putra 2:09pm Oct 18
oke suhu makasih
dicoba dulu :)

Happy Coding 2:10pm Oct 18
ane bukan suhu. ane bru bisa

Happy Coding 2:10pm Oct 18
silahkan di kombinasikan dengan kondisi if yg sudh ad di ats

Okto Alhamda Putra 4:07pm Oct 18
cool :D
thank you :)

Happy Coding 4:09pm Oct 18
udh bisa mas

Okto Alhamda Putra 4:56pm Oct 18
ini hasilnya mas
ini buat skripsi aku, mas :D
ini kombinasinya
for ($i=1; $i<=12; $i++)
{
$Y_jumlah = $_POST['Y_jumlah'.$i];
$kode_merek = $_POST['kode_merek'];
$kode_tahun = $_POST['kode_tahun'];
$bulan = $_POST['bulan'.$i];
$waktu= $bulan.$tahun;
$XY=$i*$Y_jumlah;
$X2=$i*$i;
//input data
if (!empty($Y_jumlah))
{ //keluarkan nilai terakhir/ jumlah baris
$qry_show= mysql_query("SELECT * FROM tbl_input_data");
$jumlah= mysql_num_rows($qry_show);
$bln=$jumlah+1;
$input_data_1 = "INSERT INTO tbl_input_data (kode_merek,kode_tahun,bulan,Y_jumlah,XY,X2) VALUES ('$kode_merek','$kode_tahun','$bln','$Y_jumlah','$XY','$X2')";
if ($hasil_1 and $hasil_2 and hasil_3)//if ($hasil_1 and $hasil_2 and hasil_3)
{
echo"<script language=javascript>
alert('Data berhasil diinput. Silahkan klik Oke dibawah ini!');
location.href='../../media.php?module=input_data';
</script>"; }
else {echo "Input data gagal<br>";}
}}

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