Sabtu, 17 Agustus 2013

PHP Indonesia - Facebook: [ask] siang mastah, mau bertanya, bgaimana caranya...

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/ 
Creating iOS Games: Beginner Course

Marin Todorov teaches you how to create an iPhone game easily and simply using Cocos2d in this $99 online course.
From our sponsors
[ask] siang mastah, mau bertanya, bgaimana caranya...
Aug 17th 2013, 06:53, by Felix Stanley

Felix Stanley 6:53am Aug 17
[ask]
siang mastah, mau bertanya, bgaimana caranya menampilkan date nya data yg kemarin ? seperti ini :
17 agustus 2013
aqua : 20
akua : 40
JM : 50
JS : 60
tapi yg malah terjadi seperti yg digambar

David D Aragrox 7:18am Aug 17
script php dan query SQL anda kayak gimana, coba ditunjukkin disini

Felix Stanley 7:19am Aug 17
proses input stok nya :
<?
$host="localhost";
$user="root";
$password="";
$database="galon";
mysql_connect("$host","$user","$password")or die("cannot connect");
mysql_select_db("$database")or die(" cannot selectt DB");

$merek=$_POST['merek'];
$sisa=$_POST['sisa'];
$tanggal=date("d M Y");

$merek=stripslashes($merek);
$sisa=stripslashes($sisa);

$merek=mysql_real_escape_string($merek);
$sisa=mysql_real_escape_string($sisa);

$query = "insert into stok values('$tanggal','$merek','$sisa')";
$result=mysql_query($query);
header("location:inputstok.php");

?>

ini inputstok
<?PHP
session_start();
if (!(isset($_SESSION['user']) && $_SESSION['user'] != '')) {
header ("Location: index");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />

<title>Home</title>

<link rel="stylesheet" href="css/stylenavigasi.css" />
<link rel="stylesheet" href="css/style.css" />

</head>

<body>
<ul id="nav">

<li><a href="home">Home</a></li>
<li>
<a href="#">Input Data</a>
<ul>
<li><a href="inputpelanggan">Input Data Pelanggan</a></li>
<li><a href="inputstok">Input Stok</a></li>
</ul>
</li>
<li><a href="cekstok">Cek Stok</a></li>
<li><a href="fun">Jangan Di Klik XD</a></li>
<li><a href="logout">Logout</a></li>
<li>
</ul>
<div id="jam"> <script type="text/javascript">
//var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
var currenttime = '<? print date("F d, Y H:i:s", time()+60*60*7)?>' //PHP method of getting server date
var montharray=new Array("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember")
var serverdate=new Date(currenttime)
function padlength(what){
var output=(what.toString().length==1)? "0"+what : what
return output
}
function displaytime(){
serverdate.setSeconds(serverdate.getSeconds()+1)
var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear()
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())
document.getElementById("servertime").innerHTML=datestring+" "+timestring
}

window.onload=function(){
setInterval("displaytime()", 1000)
}
</script>

<p><span id="servertime"></span></p></li>
</div>
<h2 style="text-align: center;">Input Stok</h2>

<div id="kiri">
<?php
echo "Jumlah Stok :<br>";

$host="localhost";
$user="root";
$password="";
$database="galon";
mysql_connect("$host","$user","$password")or die("cannot connect");
mysql_select_db("$database")or die(" cannot selectt DB");
$query = "SELECT * FROM stok ";
$exe = mysql_query($query);
while($row = mysql_fetch_assoc($exe)){

$a = $row['merek'];
$b = $row['sisa'];
$tanggal = $row['tanggal'];

echo "$tanggal<br><tr><td>$a :</td></tr>
<tr><td>$b</td></tr><br>";

}
?>
</div>

<div id="kanan">
<form action="proses_input_stok.php" method="POST">
<table border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td>Merek Galon</td>
<td>:</td>
<td>


<select name="merek">
<option value="aqua" selected="Aqua">Aqua</option>
<option value="akua">Akua</option>
<option value="JS">JS</option>
<option value="JM">JM</option>
<option value="ballo">Ballo</option>
</select></td>
</tr>
<tr>
<td>Jumlah Stok</td>
<td>:</td>
<td><input style="width:50px; border:1px solid blue; border-radius:4px; -moz-border-radius:4px; height:20px; margin-left:10px;" type="text" name="sisa" maxlength="20" required="required" /></td>
</tr>

<tr>
<td align="right" colspan="3"><input type="submit" name="submit" value="Simpan" /></td>
</tr>
</tbody>
</table>
</form>

</div>

</body>
</html>

David D Aragrox 7:25am Aug 17
masalahnya ada di
echo "$tanggal<br><tr><td>$a :</td></tr>
<tr><td>$b</td></tr><br>";

kalau gitu caranya tanggalnya juga ikut di loop, kan harusnya tanggalnya cuma tampil sekali, bentar saya bikinin yang bener

Felix Stanley 7:26am Aug 17
oh iya yah, dia ngikut whilenya, jadi ngambil nya 1x aja gimana itu

David D Aragrox 7:43am Aug 17
pertama

$q1 = mysql_query("SELECT * FROM stock GROUP BY
tanggal") or die(mysql_error());
$q2 = mysql_query("SELECT * FROM stock");
$jumlah_hari = mysql_num_rows($q1);

for($i = 0;$i < $jumlah_hari;$i++){
$field = mysql_fetch_row($q1);
echo "Tanggal : " . $field[tanggal];
while($field = mysql_fetch_array($q2)){
echo "$field[merk]" . ":" . "$field[sisa]";
}
}

Felix Stanley 7:47am Aug 17
itu buat show nya yg jumlah stoknya ya ?

David D Aragrox 7:49am Aug 17
iya jadi pertama kita group by tanggal nah kan ketemu ada berapa hari data dalam database itu, terus misal ada data 2 hari , maka di loop pakai for
pertama nampilin tanggal 17 agustus 2013, terus di dalem for ada while untuk nampilin merk dan stock pada hari itu,
kedua nampilin tanggal 18 agustus 2013, terus di dalem for ada while untuk nampilin merk dan stock pada hari itu.

David D Aragrox 7:57am Aug 17
gimana ada yang error gak?

Felix Stanley 7:57am Aug 17
ada gan :D lagi nyoba perbaikin :D

David D Aragrox 7:58am Aug 17
ok sip,ya kalau saya logikanya gitu sih, kalau ada logika lain monggo dicoba2 sambil experimen

Felix Stanley 8:07am Aug 17
bertanya lagi gan David D Aragrox

tanggal ngga muncul2 gan, hehe.
$q = mysql_query("SELECT * FROM stok GROUP BY tanggal") or die(mysql_error());
$q2 = mysql_query("SELECT * FROM stok");
$jumlah_hari = mysql_num_rows($q);

for($i = 0; $i < $jumlah_hari; $i++){
$field = mysql_fetch_row($q);
echo "Tanggal : <br>" . "$field[tanggal]";
while($field = mysql_fetch_array($q2)){
echo "$field[merek]".":"."$field[sisa]". "<br>";
}
}
padahal sy rasa sudah bener deh o_o
nama kolom nya di db sudah tanggal.

David D Aragrox 8:08am Aug 17
bentar saya tak mbuat database juga

David D Aragrox 8:22am Aug 17
<?php

$q = mysql_query("SELECT * FROM stock GROUP BY tanggal") or die(mysql_error());

$jumlah_hari = mysql_num_rows($q);

for($i = 0; $i < $jumlah_hari; $i++){
$field = mysql_fetch_array($q);
echo "<b>Tanggal : " . "$field[tanggal]" . "</b><br>";

$q2 = mysql_query("SELECT * FROM stock WHERE tanggal = '$field[tanggal]'") or die(mysql_error());
while($field = mysql_fetch_array($q2)){
echo "$field[merek]".":"."$field[sisa]". "<br>";
}
}
?>

David D Aragrox 8:23am Aug 17
udah saya coba script diatas bisa

Felix Stanley 8:31am Aug 17
udah bisa gan :D ditambah dengan bumbu error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
untuk menghilangkan warningnya :D
makasih banyak gan

David D Aragrox 8:31am Aug 17
ok sama-sama

Felix Stanley 8:34am Aug 17
udah bisa gan :D ditambah dengan bumbu error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
untuk menghilangkan warningnya :D
makasih banyak gan

Sunu Pinasthika F 9:11am Aug 17
cuman sekedar saran aja mas felix, apa pun bentuk peringatan meski itu notice dan warning gak penting, tetap perlu di perbaiki. karena peringatan tersebut menunjukkan bahwa masih ada bug di code kita.

jadi lakukkan penghilangan error reporting kalau memang bener bener terdesak. misal besok harus presentasi, ada error dikit tapi gak gitu penting :D, ya mungkin boleh lah pakai cara ini. tapi jangan lupa di kembalikan :D

Felix Stanley 9:12am Aug 17
:D ya nanti sy perbaiki gan, mendesak sih :D

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

PHP Indonesia - Facebook: gan nanya.. lg belajar.. ane pnya array (12,65,35...

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/ 
Creating iOS Games: Beginner Course

Marin Todorov teaches you how to create an iPhone game easily and simply using Cocos2d in this $99 online course.
From our sponsors
gan nanya.. lg belajar.. ane pnya array (12,65,35...
Aug 17th 2013, 07:13, by Bayu Septian

Bayu Septian 7:13am Aug 17
gan nanya.. lg belajar..

ane pnya array (12,65,35c,63)
trus untk ngcek array ke berapa yg ga tipe int gmn?

Al Ghurahy 8:47am Aug 17
diloop cek satu2 (sambil itung) gettype variable nya.. nih ada contoh disini:

http://php.net/manual/en/function.gettype.php

Al Ghurahy 8:49am Aug 17
kl non integernya cuman 1, mau nyari dmn nya bs jg for nya pake kyk gini:

if(!is_integer($arr[$i])) {$index = $i; break;}

Gunawan Prasetio 9:02am Aug 17
coba ini dah,

$data = array(12,65,'35c',63);
foreach ($data as $key => $value)
echo (is_int($value) ? $key . ': numeric' : $key . ': not numeric'), '<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

PHP Indonesia - Facebook: [ASK][GAME HTML 5] Agan agan, ada yang pernah biki...

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/ 
Marketing Mobile Apps

This online course focuses on marketing efforts that will increase your app's exposure and establish a mobile app marketing plan. Enroll today for $99.
From our sponsors
[ASK][GAME HTML 5] Agan agan, ada yang pernah biki...
Aug 17th 2013, 06:54, by Taufik Ramadhan

Taufik Ramadhan 6:54am Aug 17
[ASK][GAME HTML 5]
Agan agan, ada yang pernah bikin game dari HTML 5 ?
yang ringan dan bisa dijalanin di kompi dengan speksifikasi standar dan tablet ?

Totok BluesMan Silalahi 6:58am Aug 17
keknya blm ada, aplikasi game yg dibuat saat ini berbasis 2 dimensi, jd dipastikan tdk berat dan cocok di tablet dan mobile

Taufik Ramadhan 7:00am Aug 17
jadi belum ada yahh mas ?
biasa nya pake apa bikinnya?

David D Aragrox 7:02am Aug 17
kalau 2D saya pakai Game maker master collection
kalau 3D saya pakai Unity
gabung aja ke group gamedevid

Dimas Edubuntu Samid 7:03am Aug 17
pake flash

Totok BluesMan Silalahi 7:04am Aug 17
ada byk fasilitas game engine 2d, 2 diantaranya kinetic.js dan fabric.js, ada juga go.js tp berbayar

Taufik Ramadhan 7:05am Aug 17
David D Aragrox kalo pake flash nanti dia pake cheat engine

David D Aragrox 7:09am Aug 17
kalau menghindari cheat engine itu tergantung logika kita waktu mbuat game nya, ya emang ini baru bingung nyari game engine/cara mbuatnya?

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

PHP Indonesia - Facebook: [ask] selamat siang... minta inspirasi design untu...

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
[ask] selamat siang... minta inspirasi design untu...
Aug 17th 2013, 08:49, by Adhe Ryan

Adhe Ryan 8:49am Aug 17
[ask]
selamat siang...
minta inspirasi design untuk web perseorangan dong...

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

PHP Indonesia - Facebook: para master... saya mau tanyak.. Ge mana cara buat...

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 master... saya mau tanyak.. Ge mana cara buat...
Aug 17th 2013, 08:26, by Irfan Atjeh Rayeuk

Irfan Atjeh Rayeuk 8:26am Aug 17
para master...
saya mau tanyak..
Ge mana cara buat login di menu dropdon???

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

PHP Indonesia - Facebook: Tanya dong para master PHP & SQL. Saya buat databa...

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/ 
Marketing Mobile Apps

This online course focuses on marketing efforts that will increase your app's exposure and establish a mobile app marketing plan. Enroll today for $99.
From our sponsors
Tanya dong para master PHP & SQL. Saya buat databa...
Aug 17th 2013, 07:43, by Rifki Fardian

Rifki Fardian 7:43am Aug 17
Tanya dong para master PHP & SQL. Saya buat database user dengan salah satu tabenya ber type :Timestamp - default : Current_timestamp. pertanyaannya gimana caranya membuat login form pada saat dia logout, field timestamp nya otomatis terisi data waktu dia logout.. mohon pencerahannya atau web referensinya.. *newbie

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

Jumat, 16 Agustus 2013

PHP Indonesia - Facebook: Gan mohon bantuannya klu mw buat absen sekolah den...

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/ 
Refresh your vocabulary.

Learn a new word everyday by subscribing to Word of the Day. A great tool if you're studying for the GRE, GMAT or LSAT, or simply want to enhance your lexicon.
From our sponsors
Gan mohon bantuannya klu mw buat absen sekolah den...
Jul 26th 2013, 00:38, by Lintar Febriyanto

Lintar Febriyanto 12:38am Jul 26
Gan mohon bantuannya klu mw buat absen sekolah dengan mysql itu gmna y
yang px saran atau contoh mohon y gan

Ulumuddin Cahyadi Yunus 1:17am Jul 26
cari di google "contoh sistem absensi menggunakan php dan mysql"

Hardi Wantoro Slepet 5:47am Aug 17
-- sundul 사랑해윤아-- ^_^

Hardi Wantoro Slepet 5:49am Aug 17
--saya juga lagi buat ini gan bingung-- >:o

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