Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

hesap makinesi


Recommended Posts

  • 3 hafta sonra ...

ordanda bulamazsan en basit işlem :angry2:

<html>
1
<head>
2
<title> PHP Calculator </title>
3

4
</head>
5
<style>
6
body, table, td {
7
font-family: verdana;
8
font-size: 10px;
9
color: #FFFFFF;
10
}
11
</style>
12
<body>
13
<table width="300px" style="border: 1px solid black; background-color:#000000;">
14
<tr>
15
<td>
16
<H3>Calculator</H3>
17
<P>
18
<form method=get action=<?php print $PHP_SHELF; ?>>
19
Number 1: <input type=text name=number1><br>
20
Number 2: <input type=text name=number2><p>
21
<div align="center">
22
<input type=submit name=submit value=Add style="border: 1px solid black; background-color: #000080; color: #FFFFFF">
23
<input type=submit name=submit value=Subtract style="border: 1px solid black; background-color: #000080;color: #FFFFFF">
24
<input type=submit name=submit value=Divide style="border: 1px solid black; background-color: #000080; color: #FFFFFF">
25
<input type=submit name=submit value=Multiply style="border: 1px solid black; background-color: #000080; color: #FFFFFF">
26
</form>
27
</div>
28
<?php
29

30
if($submit =="Add") {
31
$result =$number1 + $number2;
32
echo "The sum of the two numbers is: $result";
33
}
34

35
if($submit =="Subtract") {
36
$result =$number1 - $number2;
37
echo "The difference of the two numbers is: $result";
38
}
39

40
if($submit =="Divide") {
41
$result =$number1 / $number2;
42
echo "The sum of the two numbers is: $result";
43
}
44

45
if($submit =="Multiply") {
46
$result =$number1 * $number2;
47
echo "The sum of the two numbers is: $result";
48
}
49

50

51

52
?>
53
</td>
54
</tr>
55
</table>
56
</body>
57
</html> [/CODE]

[CODE]<html>
<head>
<title> PHP Calculator </title>

</head>
<style>
body, table, td {
font-family: verdana;
font-size: 10px;
color: #FFFFFF;
}
</style>
<body>
<table width="300px" style="border: 1px solid black; background-color:#000000;">
<tr>
<td>
<H3>Calculator</H3>
<P>
<form method=get action=<?php print $PHP_SHELF; ?>>
Number 1: <input type=text name=number1><br>
Number 2: <input type=text name=number2><p>
<div align="center">
<input type=submit name=submit value=Add style="border: 1px solid black; background-color: #000080; color: #FFFFFF">
<input type=submit name=submit value=Subtract style="border: 1px solid black; background-color: #000080;color: #FFFFFF">
<input type=submit name=submit value=Divide style="border: 1px solid black; background-color: #000080; color: #FFFFFF">
<input type=submit name=submit value=Multiply style="border: 1px solid black; background-color: #000080; color: #FFFFFF">
</form>
</div>
<?php

if($submit =="Add") {
$result =$number1 + $number2;
echo "The sum of the two numbers is: $result";
}

if($submit =="Subtract") {
$result =$number1 - $number2;
echo "The difference of the two numbers is: $result";
}

if($submit =="Divide") {
$result =$number1 / $number2;
echo "The sum of the two numbers is: $result";
}

if($submit =="Multiply") {
$result =$number1 * $number2;
echo "The sum of the two numbers is: $result";
}



?>
</td>
</tr>
</table>
</body>
</html>[/CODE]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...