Sapaan menunjukkan keramahan seseorang....lha apakah dalam benak kalian prnah terfikirkan gimna sich caranya buat program greeting....yg biasany ada di tempat-tempat umum gtu....
hemmmm....ingin tau lbih jlasnya so plototin dueh...source codex n print screen....eits bis ntu dcoba lhow yaw
Awalnya yaw sob qta buat file cobastudikasus.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Program Sapaan willys_poenya</title>
</head>
<body>
<center>
<h1>
<?php
function greeting()
{
$date = date ("G : i A");
if ($date>=0 and $date<10) {
echo "Good Morning";
} else if ($date>=10 and $date<15) {
echo "Good Afternoon";
} else if ($date>=15 and $date<19) {
echo "Good Evening ";
}else echo "Good Night ";
}
?>
<?php greeting(); ?><br>
</h1>
<font face = "kristen itc" size = "3" color ="purple" left= 600px;>
<h2 align="center" ><b> Welcome to Willys Poenya Area</b></h2></font>
<font face = "kristen itc" size = "3" color ="purple" left= 600px;>
<h3 > Now is
<?php
//Array Hari
$array_hari = array(1=>"Monday","Tuesday","Wednesday","Thursday","Friday", "Saturday","Sunday");
$hari = $array_hari[date("N")];
//Format Tanggal
$tanggal = date ("j");
//Array Bulan
$array_bulan = array(1=>"January","February","March", "April", "May", "June","July","August","September","October", "November","December");
$bulan = $array_bulan[date("n")];
//Format Tahun
$tahun = date("Y");
//Digunakan untuk menampilkan hari,tanggal,bulan dan tahun
echo "$hari,$tanggal $bulan $tahun";
?>
<br>
Time shows at
<?php
// format penulisan waktu
$date = date ("G : i A");
echo "$date";
?>
<body background="2.jpg">
</h3>
<font face = "kristen itc" size = "3" color ="purple" left= 600px;>
<h4 align="center" >my.Greeting @2011 Wilis Dwi Probowati Poenya</h4></font>
<h5 align="center" > For next Info visit to :
<a href="cliq.willys282.blogspot.com" color ="purple" left= 600px; >
<br><b>cliq.willys282.blogspot.com<b></h5></font></br>
</body>
</html>
Lha nie print screenx sob....
Tidak ada komentar:
Posting Komentar