26 Ağustos 2011 Cuma

Toplama İşlemi [ PHP ]

<?php
error_reporting(E_ALL & ~E_NOTICE);
ini_set('error_reporting', E_ALL & ~E_NOTICE);

?>
<!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>Summation</title>
</head>

<body>
<form action="" method="post">
<table border="1px solid black"><tr>
<td>Enter First Number</td> <td><input type="text" name="one" /></td>
</tr>
<tr>
<td>Enter Second Number</td> <td><input type="text" name="two" /></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Summation" />
</td>
</tr>
</table>
</form>
<?php
if(($_POST['one']!=NULL)&&($_POST['two']!=NULL))
{
$sum=$_POST['one']+$_POST['two'];
echo "Sum=".$sum;

}
?>
</body>
</html>

Hiç yorum yok:

Yorum Gönder