recent posts

banner image

Php ile formdan gelen satir ve sutun sayisina gore tablo olusturmak


<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="tablo.php" method="post">
Satır Sayısı:<input type="text" name="satir" /><br />
Sütun Sayısı:<input type="text" name="sutun" /><br />
<input type="submit" name="gonder" value="Oluştur" />
</form> 
</body>
<?php
if(isset($_POST["gonder"]))
{
$satir=$_POST["satir"];
$sutun=$_POST["sutun"];
if($satir<100 && $sutun<100)
{
echo "<table border='1'>";
for($i=0;$i<$satir;$i++)
{
echo "<tr>";
for($k=0;$k<$sutun;$k++)
{
echo "<td>".$i*$k."</td>";
}
echo "</tr>";
}
echo "</table>";
}
else
{
echo "Satır veya Sütun sayısı 100 den büyük girilmemelidir.";
}
}
?>
Php ile formdan gelen satir ve sutun sayisina gore tablo olusturmak Php ile formdan gelen satir ve sutun sayisina gore tablo olusturmak Reviewed by Abdulhamit Ekşioğlu on Kasım 15, 2015 Rating: 5

Hiç yorum yok:

Blogger tarafından desteklenmektedir.