Cuma , 3 Şubat 2023

İnternet Programcılığı Dersi PHP Uygulama Örnekleri


Uygulama 1: İŞE BAŞVURMA

Form Kodları

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<form id=”form1″ name=”form1″ method=”post” action=”islemyap.php”>
<table width=”500″ border=”1″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”2″ align=”center”>İŞ BAŞVURU FORMU</td>
</tr>
<tr>
<td width=”186″>İSİM SOY İSİM</td>
<td width=”308″><label for=”isimsoyisim”></label>
<input type=”text” name=”isimsoyisim” id=”isimsoyisim” /></td>
</tr>
<tr>
<td>CİNSİYET</td>
<td><p>
<label>
<input name=”cinsiyet” type=”radio” id=”cinsiyet_0″ value=”BAYAN” checked=”checked” />
KADIN</label>
<br />
<label>
<input type=”radio” name=”cinsiyet” value=”BAY” id=”cinsiyet_1″ />
ERKEK</label>
<br />
</p></td>
</tr>
<tr>
<td>İL</td>
<td><label for=”il”></label>
<select name=”il” id=”il”>
<option value=”Adana”>Adana</option>
<option value=”Adıyaman”>Adıyaman</option>
<option value=”Afyonkarahisar”>Afyonkarahisar</option>
<option value=”Ağrı”>Ağrı</option>
<option value=”Amasya”>Amasya</option>
<option value=”Ankara”>Ankara</option>
<option value=”Antalya”>Antalya</option>
<option value=”Artvin”>Artvin</option>
<option value=”Aydın”>Aydın</option>
<option value=”Balıkesir”>Balıkesir</option>
<option value=”Bilecik”>Bilecik</option>
<option value=”Bingöl”>Bingöl</option>
<option value=”Bitlis”>Bitlis</option>
<option value=”Bolu”>Bolu</option>
<option value=”Burdur”>Burdur</option>
<option value=”Bursa”>Bursa</option>
<option value=”Çanakkale”>Çanakkale</option>
<option value=”Çankırı”>Çankırı</option>
<option value=”Çorum”>Çorum</option>
<option value=”Denizli”>Denizli</option>
<option value=”Diyarbakır”>Diyarbakır</option>
<option value=”Edirne”>Edirne</option>
<option value=”Elazığ”>Elazığ</option>
<option value=”Erzincan”>Erzincan</option>
<option value=”Erzurum”>Erzurum</option>
<option value=”Eskişehir”>Eskişehir</option>
<option value=”Gaziantep”>Gaziantep</option>
<option value=”Giresun”>Giresun</option>
<option value=”Gümüşhane”>Gümüşhane</option>
<option value=”Hakkâri”>Hakkâri</option>
<option value=”Hatay”>Hatay</option>
<option value=”Isparta”>Isparta</option>
<option value=”Mersin”>Mersin</option>
<option value=”İstanbul”>İstanbul</option>
<option value=”İzmir”>İzmir</option>
<option value=”Kars”>Kars</option>
<option value=”Kastamonu”>Kastamonu</option>
<option value=”Kayseri”>Kayseri</option>
<option value=”Kırklareli”>Kırklareli</option>
<option value=”Kırşehir”>Kırşehir</option>
<option value=”Kocaeli”>Kocaeli</option>
<option value=”Konya”>Konya</option>
<option value=”Kütahya”>Kütahya</option>
<option value=”Malatya”>Malatya</option>
<option value=”Manisa”>Manisa</option>
<option value=”Kahramanmaraş”>Kahramanmaraş</option>
<option value=”Mardin”>Mardin</option>
<option value=”Muğla”>Muğla</option>
<option value=”Muş”>Muş</option>
<option value=”Nevşehir”>Nevşehir</option>
<option value=”Niğde”>Niğde</option>
<option value=”Ordu”>Ordu</option>
<option value=”Rize”>Rize</option>
<option value=”Sakarya”>Sakarya</option>
<option value=”Samsun”>Samsun</option>
<option value=”Siirt”>Siirt</option>
<option value=”Sinop”>Sinop</option>
<option value=”Sivas”>Sivas</option>
<option value=”Tekirdağ”>Tekirdağ</option>
<option value=”Tokat”>Tokat</option>
<option value=”Trabzon”>Trabzon</option>
<option value=”Tunceli”>Tunceli</option>
<option value=”Şanlıurfa”>Şanlıurfa</option>
<option value=”Uşak”>Uşak</option>
<option value=”Van”>Van</option>
<option value=”Yozgat”>Yozgat</option>
<option value=”Zonguldak”>Zonguldak</option>
<option value=”Aksaray”>Aksaray</option>
<option value=”Bayburt”>Bayburt</option>
<option value=”Karaman”>Karaman</option>
<option value=”Kırıkkale”>Kırıkkale</option>
<option value=”Batman”>Batman</option>
<option value=”Şırnak”>Şırnak</option>
<option value=”Bartın”>Bartın</option>
<option value=”Ardahan”>Ardahan</option>
<option value=”Iğdır”>Iğdır</option>
<option value=”Yalova”>Yalova</option>
<option value=”Karabük”>Karabük</option>
<option value=”Kilis”>Kilis</option>
<option value=”Osmaniye”>Osmaniye</option>
<option value=”Düzce”>Düzce</option>
</select></td>
</tr>
<tr>
<td>YAŞ</td>
<td><label for=”yas”></label>
<input type=”text” name=”yas” id=”yas” /></td>
</tr>
<tr>
<td colspan=”2″ align=”center”><input type=”submit” name=”button” id=”button” value=”GÖNDER” />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type=”submit” name=”button2″ id=”button2″ value=”VAZGEÇ” /></td>
</tr>
</table>
</form>
</body>
</html>

Hesaplama Sayfası Kodları

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<?php
$gisimsoyisim=$_POST[‘isimsoyisim’];
$gcinsiyet=$_POST[‘cinsiyet’];
$gil=$_POST[‘il’];
$gyas=$_POST[‘yas’];
print “İSİM SOYİSİM: “.$gisimsoyisim.”<BR><BR>”;
print “CİNSİYET: “.$gcinsiyet.”<BR><BR>”;
print “ŞEHİR: “.$gil.”<BR><BR>”;
print “YAŞ: “.$gyas.”<BR><BR>”;

//şart erkek ise 18-40 yaş arası
//kadın ise 18-30 yaş

if($gcinsiyet==”BAY”)
{
if($gyas>=18 and $gyas<=40)
{
print “<font color=’green’>”.”YAŞINIZ UYGUN OLDUĞU İÇİN İŞE BAŞVURU YAPABİLİRSİNİZ”.”</font>”;
}
else
{
print “<font color=’#FF0000′>”.”YAŞINIZ UYGUN OLMADIĞI İÇİN İŞE BAŞVURU YAPAMAZSINIZ”.”</font>”;
}
}
else if($gcinsiyet==”BAYAN”)
{
if($gyas>=18 and $gyas<=30)
{
print “<font color=’green’>”.”YAŞINIZ UYGUN OLDUĞU İÇİN İŞE BAŞVURU YAPABİLİRSİNİZ”.”</font>”;
}
else
{
print “<font color=’#FF0000′>”.”YAŞINIZ UYGUN OLMADIĞI İÇİN İŞE BAŞVURU YAPAMAZSINIZ”.”</font>”;
}
}

?>
</body>
</html>

Uygulama 2: ARAÇ BAKIM RANDEVU FORMU

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<form id=”form1″ name=”form1″ method=”post” action=”formislem.php”>
<table width=”500″ border=”1″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”2″ align=”center”>ARAÇ BAKIM RANDEVU FORMU</td>
</tr>
<tr>
<td width=”216″>ARAÇ PLAKA</td>
<td width=”278″><label for=”arac_plaka”></label>
<input type=”text” name=”arac_plaka” id=”arac_plaka” /></td>
</tr>
<tr>
<td>ARAÇ MODEL</td>
<td><label for=”model_yili”></label>
<select name=”model_yili” id=”model_yili”>
<option value=”2000″>2000</option>
<option value=”2001″ selected=”selected”>2001</option>
<option value=”2002″>2002</option>
<option value=”2003″>2003</option>
<option value=”2004″>2004</option>
<option value=”2005″>2005</option>
</select></td>
</tr>
<tr>
<td>ARAÇ SAHİBİ</td>
<td><label for=”arac_sahip”></label>
<input name=”arac_sahip” type=”text” id=”arac_sahip” /></td>
</tr>
<tr>
<td>ARAÇ YAKIT TİPİ</td>
<td><p>
<label>
<input type=”radio” name=”yakit_tipi” value=”dizel” id=”yakit_tipi_0″ />
DİZEL</label>
<br />
<label>
<input type=”radio” name=”yakit_tipi” value=”lpg+benzin” id=”yakit_tipi_1″ />
LPG+BENZİN</label>
<br />
<label>
<input type=”radio” name=”yakit_tipi” value=”benzin” id=”yakit_tipi_2″ />
BENZİN</label>
<br />
<label>
<input type=”radio” name=”yakit_tipi” value=”hybrit” id=”yakit_tipi_3″ />
HYBRIT</label>
<br />
<label>
<input type=”radio” name=”yakit_tipi” value=”elektrik” id=”yakit_tipi_4″ />
ELEKTRİKLİ</label>
<br />
</p></td>
</tr>
<tr>
<td colspan=”2″ align=”center”><input type=”submit” name=”button” id=”button” value=”GÖNDER” />
<input type=”reset” name=”button2″ id=”button2″ value=”VAZGEÇ” /></td>
</tr>
</table>
</form>
</body>
</html>

İşlem Sayfası Kodları:

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<?php
$garac_plaka=$_POST[‘arac_plaka’];
$gmodel_yili=$_POST[‘model_yili’];
$garac_sahibi=$_POST[‘arac_sahip’];
$gyakit_tipi=$_POST[‘yakit_tipi’];
print “ARAÇ PLAKA:”.$garac_plaka.”<br>”;
print “ARAÇ MODEL YILI:”.$gmodel_yili.”<br>”;
print “ARAÇ SAHİBİ:”.$garac_sahibi.”<br>”;
print “ARAÇ YAKIT TİPİ:”.$gyakit_tipi.”<br>”;
?>
</body>
</html>

Uygulama 3: ÇARPIM TABLOSU ÇİZME

FORM SAYFASI

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<form id=”form1″ name=”form1″ method=”post” action=”carpimtablosuciz.php”>
<table width=”500″ border=”1″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”2″ align=”center”>ÇARPIM TABLOSU OLUŞTUR</td>
</tr>
<tr>
<td width=”236″>BASAMAK SEÇİNİZ</td>
<td width=”258″><label for=”sayisec”></label>
<select name=”sayisec” id=”sayisec”>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
<option value=”4″>4</option>
<option value=”5″>5</option>
<option value=”6″>6</option>
<option value=”7″>7</option>
<option value=”8″>8</option>
<option value=”9″>9</option>
<option value=”10″>10</option>
</select></td>
</tr>
<tr>
<td colspan=”2″ align=”center”><input type=”submit” name=”button” id=”button” value=”SEÇ” />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type=”submit” name=”button2″ id=”button2″ value=”VAZGEÇ” /></td>
</tr>
</table>
</form>
</body>
</html>

İŞLEM SAYFASI KODLARI

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<?php
$gsayi=$_POST[‘sayisec’];
//7 x 0 = 0
//7 x 1 = 7
for($k=0;$k<=10;$k++)
{
print $gsayi.” x “. $k. ” = “.$k*$gsayi.”<br>”;
}
?>
</body>
</html>

Uygulama 4: NOT HESAPLAMA

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>

<body>
<form id=”form1″ name=”form1″ method=”post” action=”hesapla.php”>
<table width=”500″ border=”1″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td colspan=”3″ align=”center”>DERS NOTU HESAPLAMA FORMU</td>
</tr>
<tr>
<td width=”193″ rowspan=”2″>VİZE</td>
<td width=”134″>NOT</td>
<td width=”165″>YÜZDELİK</td>
</tr>
<tr>
<td><label for=”vize”></label>
<input type=”text” name=”vize” id=”vize” /></td>
<td><label for=”vizeyuzde”></label>
<select name=”vizeyuzde” id=”vizeyuzde”>
<option value=”40″>%40</option>
<option value=”30″>%30</option>
</select></td>
</tr>
<tr>
<td rowspan=”2″>FİNAL</td>
<td>NOT</td>
<td>YÜZDELİK</td>
</tr>
<tr>
<td><label for=”final”></label>
<input type=”text” name=”final” id=”final” /></td>
<td><label for=”finalyuzde”></label>
<select name=”finalyuzde” id=”finalyuzde”>
<option value=”60″>%60</option>
<option value=”70″>%70</option>
</select></td>
</tr>
<tr>
<td>GEÇME NOTU</td>
<td colspan=”2″><label for=”gecmenotu”></label>
<input name=”gecmenotu” type=”text” id=”gecmenotu” value=”70″ readonly=”readonly” /></td>
</tr>
<tr>
<td colspan=”3″ align=”center”><input type=”submit” name=”GÖNDER” id=”GÖNDER” value=”GÖNDER” />
&nbsp;&nbsp;&nbsp;&nbsp;<input type=”reset” name=”button2″ id=”button2″ value=”VAZGEÇ” /></td>
</tr>
</table>
</form>
</body>
</html>

İŞLEM SAYFASI

<!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>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<?php
$gvize=$_POST[‘vize’];
$gvize_yuzde=$_POST[‘vizeyuzde’];
$gfinal=$_POST[‘final’];
$gfinal_yuzde=$_POST[‘finalyuzde’];
$ggecmenotu=$_POST[‘gecmenotu’];
$not=($gvize*$gvize_yuzde/100)+($gfinal*$gfinal_yuzde/100);
print “DERSTEN ALDIĞINIZ NOT: “.$not.”<BR>”;
if($not>=$ggecmenotu)
{
print”<font color=’green’> DERSTEN GEÇTİNİZ </font>”;
}
else
{
print”<font color=’red’> DERSTEN KALDINIZ </font>”;
}
?>
<body>
</body>
</html>

Bu Konuda İlginizi Çekebilir

Grafik Uygulama Ödevi-8

Örnek Tasarım Çalışmaları Aşağıdaki tasarımlardan 2 tanesini seçip fireworks ortamında çiziniz. Boyut 1080×1080 Son teslim …

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir