1 PHP သံုးျပီးေမြးေန႔ရွာရေအာင္ [Tips & Tricks] 10th October 2009, 7:08 pm
C0D3R
MITR Master
PHP သံုးျပီးေမြးေန႔ရွာရေအာင္
ေပးထားတဲ႔ box ေလးမွာ Date , Month , Year ဆိုတာကိုထည္႔ေပးျပီး submit ဆိုတာကိုနွိပ္လိုက္ရင္
သင္ဘယ္ေန႔သားလဲဆိုတာအေျဖထြက္လာပါျပီဗ်ာ
ျပက္ကဒိန္ျပန္ၾကည္႔စရာမလိုေတာ႔ဘူးဗ်ိဳ႕
ကုတ္ေလးကို .php နဲသိမ္းျပီးစမ္းလိုက္ေတာ႔ဗ်ာ
ေပးထားတဲ႔ box ေလးမွာ Date , Month , Year ဆိုတာကိုထည္႔ေပးျပီး submit ဆိုတာကိုနွိပ္လိုက္ရင္
သင္ဘယ္ေန႔သားလဲဆိုတာအေျဖထြက္လာပါျပီဗ်ာ
ျပက္ကဒိန္ျပန္ၾကည္႔စရာမလိုေတာ႔ဘူးဗ်ိဳ႕
ကုတ္ေလးကို .php နဲသိမ္းျပီးစမ္းလိုက္ေတာ႔ဗ်ာ
.text {
color: #000000;
font-family: "Trebuchet MS";
}
Date:
$i) { echo " selected="selected""; } ?>>?>
$months = array("1" => "January",
"2" => "February",
"3" => "March",
"4" => "April",
"5" => "May",
"6" => "June",
"7" => "July",
"8" => "August",
"9" => "September",
"10" => "October",
"11" => "November",
"12" => "December"
);
?>
Month:
== $mid) { echo " selected="selected""; } ?>>$month; ?>
Year:
$i) { echo " selected="selected""; } ?>>?>
if($_GET)
{
foreach($_GET as $key => $val)
{
$_GET['$key'] = htmlspecialchars($val);
}
$day_of_week = date("l", mktime(0, 0, 0, $_GET['month'] , $_GET['date'] , $_GET['year']));
echo "You were born on a " . $day_of_week . "";
}
?>