https://suryahadi0.wordpress.com/2016/05/06/tutorial-voip-menggunakan-trixbox/
http://nurkamilahaprilia07.blogspot.com/2016/10/membuat-server-voip-sederhana.html
Jumat, 30 Agustus 2019
mATERI 2 Merubah isi tampil.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body align="center">
<?php
include "koneksi.php";
?>
<script type="text/javascript">
function delete_id(id)
{
if(confirm('Yakin mau dihapus datanya ?'))
{
window.location.href='delete.php?delete_id='+id;
}
}
</script>
<table border="1" cellpadding="5" cellspacing="0" align="center">
<tr>
<td bgcolor='#000FFF'>Id</td>
<td bgcolor='#000FFF'>Nama</td>
<td bgcolor='#000FFF'>Alamat</td>
<td bgcolor='#000FFF'>Tahun</td>
<td bgcolor='#000FFF'>Kelas</td>
<td bgcolor='#000FFF'>Rombel</td>
<td bgcolor='#000FFF'>Delete</td>
<td bgcolor='#000FFF'>Edit</td>
</tr>
<?php
$query = mysqli_query($dbconnect, "SELECT * FROM siswa order by id DESC")
or die (mysqli_error($dbconnect));
//menampilkan JUMLAH BARIS
echo "<br>";
$jumlah=mysqli_num_rows($query);
echo "Jumlah data ada : ".$jumlah;
echo "<br><br>";
//SELESAI MENAMPILKAN JUMLAH
while ($row = mysqli_fetch_array($query)) {
echo
"<tr>
<td align='center' bgcolor='#00FFFF'>{$row['id']}</td>
<td bgcolor='#00FFFF'>{$row['nama']}</td>
<td bgcolor='#00FFFF'>{$row['alamat']}</td>
<td bgcolor='#00FFFF'>{$row['tahun']}</td>
<td bgcolor='#00FFFF'>{$row['kelas']}</td>
<td bgcolor='#00FFFF'>{$row['rombel']}</td>
<td bgcolor='#00FFFF' align='center'><a href='javascript:delete_id($row[0])'>Delete</a></td>
<td align='center' bgcolor='#00FFFF'><a href=update.php?id={$row['id']}/>Edit</a></td>
</tr>\n";
}
?>
</table><br>
<?php
include "tglskg.php";
?>
</body>
<?
}
?>
</html>
----------------
Buat file bernama koneksi.php
isinya
-------------
<?php
$hostname = "localhost";
$username = "XXXXX";
$password = "XXXX";
$db = "id6587238_sekolah";
$dbconnect=mysqli_connect($hostname,$username,$password,$db);
if ($dbconnect->connect_error) {
die("Database connection failed: " . $dbconnect->connect_error);
}
?>
-----------------------
<html>
<body align="center">
<?php
include "koneksi.php";
?>
<script type="text/javascript">
function delete_id(id)
{
if(confirm('Yakin mau dihapus datanya ?'))
{
window.location.href='delete.php?delete_id='+id;
}
}
</script>
<table border="1" cellpadding="5" cellspacing="0" align="center">
<tr>
<td bgcolor='#000FFF'>Id</td>
<td bgcolor='#000FFF'>Nama</td>
<td bgcolor='#000FFF'>Alamat</td>
<td bgcolor='#000FFF'>Tahun</td>
<td bgcolor='#000FFF'>Kelas</td>
<td bgcolor='#000FFF'>Rombel</td>
<td bgcolor='#000FFF'>Delete</td>
<td bgcolor='#000FFF'>Edit</td>
</tr>
<?php
$query = mysqli_query($dbconnect, "SELECT * FROM siswa order by id DESC")
or die (mysqli_error($dbconnect));
//menampilkan JUMLAH BARIS
echo "<br>";
$jumlah=mysqli_num_rows($query);
echo "Jumlah data ada : ".$jumlah;
echo "<br><br>";
//SELESAI MENAMPILKAN JUMLAH
while ($row = mysqli_fetch_array($query)) {
echo
"<tr>
<td align='center' bgcolor='#00FFFF'>{$row['id']}</td>
<td bgcolor='#00FFFF'>{$row['nama']}</td>
<td bgcolor='#00FFFF'>{$row['alamat']}</td>
<td bgcolor='#00FFFF'>{$row['tahun']}</td>
<td bgcolor='#00FFFF'>{$row['kelas']}</td>
<td bgcolor='#00FFFF'>{$row['rombel']}</td>
<td bgcolor='#00FFFF' align='center'><a href='javascript:delete_id($row[0])'>Delete</a></td>
<td align='center' bgcolor='#00FFFF'><a href=update.php?id={$row['id']}/>Edit</a></td>
</tr>\n";
}
?>
</table><br>
<?php
include "tglskg.php";
?>
</body>
<?
}
?>
</html>
----------------
Buat file bernama koneksi.php
isinya
-------------
<?php
$hostname = "localhost";
$username = "XXXXX";
$password = "XXXX";
$db = "id6587238_sekolah";
$dbconnect=mysqli_connect($hostname,$username,$password,$db);
if ($dbconnect->connect_error) {
die("Database connection failed: " . $dbconnect->connect_error);
}
?>
-----------------------
Materi 1 latihan WEb database : Autodirect
Autodirect dari file index.php menuju ke file tampil.php
Jangan lupa buat file tampil.php
isinya :
-------------
sementara yang index.php isinya sbb :
ini scriptnya :
---------------
<script> location.replace("tampil.php"); </script>
--------------
Jangan lupa buat file tampil.php
isinya :
-------------
<?php echo "Halo dunia"; ?>--------------
sementara yang index.php isinya sbb :
ini scriptnya :
---------------
<script> location.replace("tampil.php"); </script>
--------------
Minggu, 25 Agustus 2019
Jumat, 23 Agustus 2019
Menambah gambar di HTML pada halaman web index sebelumnya
Contoh penggunaan tag <img>:
1
2
3
4
5
6
7
8
9
10
| <! DOCTYPE html> < html > < head > < title >Penggunaan Tag Image</ title > </ head > < body > < h1 >Belajar Tag Gambar</ h1 > < img src = "koala.jpg" /> </ body > </ html > |
Perhatikan bahwa tag <img> tidak memiliki elemen, sehingga langsung ditutup dengan />
Membuat atau menambahkan Table HTML di index.html
Selanjutnya adalah cara membuat tabel di HTML, silakan tambahkan code di bawah ini setelah code untuk list yaitu di bawah tag </ul>.
<table border="1"> <tr> <td>Bayi</td> <td>Pelajar</td> <td>Personal</td> <td>Bisnis</td> </tr> <tr> <td>Rp 19.800/ bln</td> <td>Rp 44.800/ bln</td> <td>Rp 67.800/ bln</td> <td>Rp 91.800/ bln</td> </tr> <tr> <td>500 MB Disk Space</td> <td>Unlimited Disk Space</td> <td>Unlimited Disk Space</td> <td>Unlimited Disk Space</td> </tr> <tr> <td>1 Domain</td> <td>10 Addon Domains</td> <td>Unlimited Addon Domains</td> <td>Unlimited Addon Domains</td> </tr> </table>
Untuk tampilan tabel akan terlihat seperti gambar di bawah:
Jumat, 09 Agustus 2019
Langganan:
Postingan (Atom)