<form id="form1" name="form1" method="post" action="hesapla.php">
  <table width="242" border="0">
    <tr>
      <td>Ad Soyad:</td>
      <td><input type="text" name="adisoyadi" id="adisoyadi" /></td>
    </tr>
    <tr>
      <td>Not1:</td>
       <td><input type="text" name="sayi1" id="sayi1" /></td>
    </tr>
    <tr>
      <td>Not2:</td>
      <td><input type="text" name="sayi2" id="sayi2" /></td>
    </tr>
    <tr>
      <td>Not3:</td>
      <td><input type="text" name="sayi3" id="sayi3" /></td>
     </tr>
    <tr>
      <td> </td>
      <td><input type="submit" name="button" id="button" value="Hesapla" /></td>
    </tr>
  </table>
</form>

 Alttaki kodlar "hesapla.php" olarak kaydedilecektir.

 

<?php
 
$adisoyadi = $_POST['adisoyadi'];
 
$sayi1 = $_POST['sayi1'];
 
$sayi2 = $_POST['sayi2'];
 
$sayi3 = $_POST['sayi3'];
 
$ort = ($sayi1+$sayi2+$sayi3)/3;
 
echo "Sayin: ".$adisoyadi,"<BR>";
echo "1.Yazili Notunuz: ".$sayi1,"<BR>";
echo "2.Yazili Notunuz: ".$sayi2,"<BR>";
echo "3.Yazili Notunuz: ".$sayi3,"<BR>";
echo " Not Ortalamaniz: ".$ort;
 
?>

 Öğrencim Ufuk YILMAZ ın katkılarıyla.