Jumat, 18 Oktober 2013

PHP Indonesia - Facebook: Asalam Mualaikum para master php :D Saya mau tanya...

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/ 
Learning HTML & CSS shouldn't be difficult.

Master Trainer, Mark Lassoff, will teach you everything you need to know to create a creative and professional web site in 4 hours.
From our sponsors
Asalam Mualaikum para master php :D Saya mau tanya...
Oct 18th 2013, 20:08, by Fadhilah Rachman

Fadhilah Rachman 8:08pm Oct 18
Asalam Mualaikum para master php :D
Saya mau tanya lagi nih...
saya mau bikin page scrol nih, kok malah begini yaaaa tampilnya...
untuk codingnya :

<html>
<head>
<title>Lihat Komentar</title>
</head>
<body>
<h2>Lihat Komentar</h2>
<table border="1px" width="50%">
<tr>
<td width="4%">No</td>
<td width="36%">Nama</td>
<td width="60%">Komentar</td>
</tr>
<?php
include 'connect.php';
$query = mysql_query("select * from komentar");
while ($data=mysql_fetch_array($query))
{
?>
<tr>
<td>1</td>
<td><a href="mailto:<?php echo $data['email'];?>"><?php echo $data['user'];?></a></td>
<td><?php echo $data['comment'];?></td>
</tr>
<?php
}
?>
</table>
<p>

<tr>
<td width="713" height="25" align="center" valign="middle">&nbsp;</td>
</tr>
<p>&nbsp;</p>
<p><a href="index.php?p=bukutamu">Berikan Komentar</a>
</p>
</body>
</html>

Ryo Way 8:16pm Oct 18
<td>1</td> nya itu statsi om,,

Muhammad Taufiq Hidayat 8:18pm Oct 18
<html>
<head>
<title>Lihat Komentar</title>
</head>
<body>
<h2>Lihat Komentar</h2>
<table border="1px" width="50%">
<tr>
<td width="4%">No</td>
<td width="36%">Nama</td>
<td width="60%">Komentar</td>
</tr>
<?php
include 'connect.php';
$query = mysql_query("select * from komentar");
$no=1;
while ($data=mysql_fetch_array($query))
{
?>
<tr>
<td><?php echo $no++; ?></td>
<td><a href="mailto:<?php echo $data['email'];?>"><?php echo $data['user'];?></a></td>
<td><?php echo $data['comment'];?></td>
</tr>
<?php
}
?>
</table>
<p>

<tr>
<td width="713" height="25" align="center" valign="middle">&nbsp;</td>
</tr>
<p>&nbsp;</p>
<p><a href="index.php?p=bukutamu">Berikan Komentar</a>
</p>
</body>
</html>

Muhammad Rangga 8:20pm Oct 18
biar berurutan gitu??
itu di script nya ditulis konstan
<td>1<td>
jadi munculnya 1 smua
coba deh
<?php
$no=1; // --
include 'connect.php';
$query = mysql_query("select * from komentar");
while ($data=mysql_fetch_array($query))
{
?>
<tr>
<td><?php echo $no; /* -- */?></td>
<td><a href="mailto:<?php echo $data['email'];?>"><?php echo $data['user'];?></a></td></tr><?php
$no++; // --
}
?>

Fadhilah Rachman 8:22pm Oct 18
iya udah bisa nih, copy skrip dr mas Muhammad Taufiq Hidayat...
makasih yaa mas, tolong penjelasannya mas? tentang kodingan <td><?php echo $no++; ?></td>....
saya masih buta banget.....
makasih sebelumnya buat yg undah bantu saya :D

Muhammad Taufiq Hidayat 8:24pm Oct 18
jadi di atas while ada,
$no=1;
terus setelah lopping while
ada $no++;
setiap lopping $no akan di tambah 1

Fadhilah Rachman 8:29pm Oct 18
while sama lopping while itu apa yaa mas?

Muhammad Taufiq Hidayat 8:30pm Oct 18
Lopping itu perulangan,
ada while, for sama do_while,
yg mas gunakan itu while

while ($data=mysql_fetch_array($query)) <-- ini lopping
{

}

#maklum masih smp

Fadhilah Rachman 8:35pm Oct 18
oke, makasih yaa mas :)

Muhammad Taufiq Hidayat 8:36pm Oct 18
saya baru anak kemarin pak, saya masih smk kelas 2 kok :D

Ryo Way 8:37pm Oct 18
while adalah looping;
$no = 1; adalah deklarasi awal nilai $no
$no++; menampilkan nilai $no lalu menambah +1 nilai $no jika dieksekusi;
untuk lebih jelas nya mungkin bisa googling

Fadhilah Rachman 8:39pm Oct 18
oke, Taufiq Hidayat makasih yaa... ( sukses buat bulu tangkis dan karya webnya ) :D

agan Ryo makasih juga, iyaa nih... lagi googling biar semakin tau :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

Tidak ada komentar:

Posting Komentar