//operatorlerde işlem onceliiği
//index.php
<form action="gelen.php" method="post">
Toplama 1=<input type="text" name="sayi1">
<br>
Toplama 2=<input type="text" name="sayi2">
<br>
Carpma 3=<input type="text" name="sayi3">
<br>
<input type="submit" value="gönder"/>
</form>
//gelen.php
<?php
$sayi1=$_POST["sayi1"];
$sayi2=$_POST["sayi2"];
$sayi3=$_POST["sayi3"];
echo "sayi 1: ".$sayi1."<br>"."sayi 2:".$sayi2."<br>"."sayi 3:".$sayi3."<br>";
$a=($sayi1+$sayi2)*$sayi3;
$b=$sayi1+$sayi2*$sayi3;
echo $a."<br>";
echo $b;
?>
Hiç yorum yok:
Yorum Gönder