Jump to content
×
×
  • Create New...

Lorem Ipsum is simply dummy text

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

Test Test

Lorem Ipsum is simply dummy text

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

Test Test

Lorem Ipsum is simply dummy text

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

Test Test

Lorem Ipsum is simply dummy text

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

Test Test

Lorem Ipsum is simply dummy text

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

Test Test

  • Bu Alana Reklam Verebilirsiniz
    Bu Alana Reklam Verebilirsiniz

Büyük ve Küçük Harfe Dönüştürme İşlemleri Programı Örneği Ve Kodları | PHP

Rate this topic


Recommended Posts

Büyük ve Küçük Harfe Dönüştürme İşlemleri Programı Örneği Ve Kodları | PHP
  • Members

Bu örneğimizde kullanıcının klavyeden girmiş olduğu bir ifadeyi yapılan tercihe göre büyük harfe yada küçük harfe dönüştürme işlemini yapan php örneğini yapacağız. Php büyük harfe çevirmek için strtoupper fonksiyonu kullanılır.  Php küçük harfe çevirmek için strtolower fonksiyonu kullanılır. Kullanıcının klavyeden giriş yapabilmesi için bir form sayfası ve işlemin yapılması için diğer bir sayfa yapacağız. Sayfalar ve kodları aşağıdaki gibidir. Sayfanın altında bulunan linkten kendiniz deneyebilirsiniz.

buyukkucukharf1.php sayfasının 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>PHP Büyük Harf Küçük Harf Dönüştürme-1</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>

<form action="buyukkucukharf2.php" method="post">
<table border="0" bgcolor="#00FF99">
  <tr>
    <td colspan="2" align="center">PHP Girilen İfadeyi Büyük-Küçük Harfe Dönüştürme</td>
    </tr>
  <tr bgcolor="#6600FF">
    <td>Metni Giriniz:</td>
    <td><input name="metin" type="text" /></td>
  </tr>
  
  <tr>
    <td>Çeviri Türü:</td>
    <td><input type="radio" name="radio" id="radio" value="buyuk" />
      <label for="radio">Büyük Harf <br />
        <input type="radio" name="radio" id="radio" value="kucuk" />
      Küçük Harf</label></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input name="gonder" type="submit" value="Çevir" /></td>
  </tr>
</table>

</form>
<br />

</body>
</html>

 

buyukkucukharf2.php sayfasının 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>PHP Büyük Harf Küçük Harf Dönüştürme-2</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
 
<body>
<?php
$metin=$_POST['metin'];
$cevir=$_POST['radio'];
 
if ($cevir=="buyuk")
{
	$yaz=strtoupper($metin);
	$harf="Büyük Harf";	
}
 
if ($cevir=="kucuk")
{
	$yaz=strtolower($metin);
	$harf="Küçük Harf";		
}
 
 
?>
<font size="+2">
<table border="1" bgcolor="#FFFF66">
  <tr bgcolor="#00CCCC">
    <td colspan="2" align="center">PHP Girilen İfadeyi Büyük-Küçük Harfe Dönüştürme</td>
  </tr>
  <tr bgcolor="#99FF66">
    <td>Girilen Metin:</td>
    <td><?php echo $metin; ?></td>
  </tr>
  <tr bgcolor="#CC9966">
    <td><font size="+2">Çevrilen Harf</font>:</td>
    <td><?php echo $harf; ?></td>
  </tr>
  <tr bgcolor="#99FF66">
    <td><font size="+2">Dönüştürülen Hali</font>:</td>
    <td><?php echo $yaz; ?></td>
  </tr>
</table>
</font>
<A HREF="javascript:javascript:history.go(-1)">Geri dön</A>
<br />
 
</body>
</html>

 

----------------------------------------------------------------------------

Konu Altı Reklam 1
Konu Altı Reklam 2
  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...