StrongFaith II
Member
- Nov 23, 2010
- 307
- 2
Hey People,
Ehm , i was thinking on fixing all bugs in Calculator R2.0 and make a different CSS for it ! Done with it , now going to release it here !!
¬_->Calculator<-_¬
Screenie :
index.php:
results_way1.php
results_way2.php
results_way3.php :
Credits :
StronGCoder(me) - 100% for coding it !
hope you like it , if u wanna flame dont comment , rate ?/0!
Thanks!!!,
StronGCoder!!
Ehm , i was thinking on fixing all bugs in Calculator R2.0 and make a different CSS for it ! Done with it , now going to release it here !!
¬_->Calculator<-_¬
Screenie :
You must be registered for see images attach
index.php:
PHP:
<html>
<head>
<title>Calculator R2</title>
</head>
<body background="./images/background.gif">
<style type="text/css">
body {
background-color: black;
background-repeat: repeat;
}
#site {
background-color: white;
background-repeat: repeat;
border-radius: 2px;
width: 600px;
padding-left: 10px;
}
</style>
<center>
<div id="site">
<br />
<font color="orange"><b><h2>Calculator</h2><br>
Welcome to Calculator Coded by StronGCoder.<br>
Today is <?php echo date("d/m/y"); ?>.<br>
Thanks for vising us<br><br>
<h3><b>Choose a way to calculate</b></h3></font>
<br><br>
<big><font color="black">NOTICE: All operators are "+" but that doesn't mean it can be ONLY "+" .</big></font>
<br><br>
<form action="./index.php" method="post">
<select name="wTc">
<option>First Number + Second Number</option>
<option>( First Number + Second Number ) + ( Third number + Fourth number )</option>
<option>First Number + ( Second Number + Third Number )</option>
</select>
<br><br><?php if(!$_POST['wTc']) {
?>
<input type="submit" value="Go on...">
<br><br>
<?php
{} }
if($_POST["wTc"] == "First Number + Second Number")
{
?>
<br><br>
<a href="./results_way1.php"><font color="orange">Choose this way to calculate</font></a>
<br><br>
<?php
}
?>
<?php
if($_POST["wTc"] == "( First Number + Second Number ) + ( Third number + Fourth number )")
{
?>
<br><br>
<a href="./results_way2.php"><font color="orange">Choose this way to calculate</font></a>
<br><br>
<?php
}
?>
<?php
if($_POST["wTc"] == "First Number + ( Second Number + Third Number )")
{
?>
<br><br>
<a href="./results_way3.php"><font color="orange">Choose this way to calculate</font></a>
<br><br>
<?php
}
?>
</b>
</form>
</center>
</div>
</body>
</html>
results_way1.php
PHP:
<html>
<head>
<title>Calculator Way 1</title>
</head>
<body background="./images/background.gif">
<style type="text/css">
body {
background-color: black;
background-repeat: repeat;
}
#site {
background-color: white;
background-repeat: repeat;
border-radius: 2px;
width: 600px;
padding-left: 10px;
}
</style>
<center>
<div id="site">
<b>
<font color="orange">
<form action="results_way1.php" method="post">
First number: <input type="number" name="x"><br>
Operator: <input type="operator" name="oper"><br>
Second Number: <input type="number" name="y"><br>
<br><input type="submit" value="Go on..."><br>
<?php
if(!$_POST["x"])
{
echo "<br><br>Fill the first number please";
}
if(!$_POST["oper"])
{
echo "<br><br>Fill the correct operator please";
}
if(!$_POST["y"])
{
echo "<br><br>Fill the second number please";
}
if($_POST["oper"] == "+")
{
echo "<br><br>";
echo $_POST["x"] . " + " . $_POST["y"];
echo " = ";
echo $_POST["x"] + $_POST["y"];
}
if($_POST["oper"] == "-")
{
echo "<br><br>";
echo $_POST["x"] . " - " . $_POST["y"];
echo " = ";
echo $_POST["x"] - $_POST["y"];
}
if($_POST["oper"] == "*")
{
echo "<br><br>";
echo $_POST["x"] . " * " . $_POST["y"];
echo " = ";
echo $_POST["x"] * $_POST["y"];
}
if($_POST["oper"] == "/")
{
echo "<br><br>";
echo $_POST["x"] . " / " . $_POST["y"];
echo " = ";
echo $_POST["x"] / $_POST["y"];
}
?>
</b>
</font>
</form>
</div>
</body>
</html>
results_way2.php
PHP:
<html>
<head>
<title>Calculator Way 2</title>
</head>
<body background="./images/background.gif">
<style type="text/css">
body {
background-color: black;
background-repeat: repeat;
}
#site {
background-color: white;
background-repeat: repeat;
border-radius: 2px;
width: 600px;
padding-left: 10px;
}
</style>
<center>
<div id="site">
<font color="orange">
<b>
<form action="results_way2.php" method="post">
( First number: <input type="number" name="x"><br>
First Operator: <input type="operator" name="oper"><br>
Second number: <input type="number" name="y"> ) <br>
Second Operator: <input type="operator" name="oper2"><br>
( Third number: <input type="number" name="x2"><br>
Third Operator: <input type="operator" name="oper3"><br>
Fourth number: <input type="number" name="y2"> )<br>
<br><input type="submit" value="Go on..."><br><br>
<?php
if(!$_POST["x"])
{
echo "<br><br>Fill the first number please<br><br>";
}
if(!$_POST["oper"])
{
echo "<br><br>Fill the first operator please<br><br>";
}
if(!$_POST["y"])
{
echo "<br><br>Fill the second number please<br><br>";
}
if(!$_POST["oper2"])
{
echo "<br><br>Fill the second operator please<br><br>";
}
if(!$_POST["x2"])
{
echo "<br><br>Fill the third number please<br><br>";
}
if(!$_POST["oper3"])
{
echo "<br><br>Fill the third operator please<br><br>";
}
if(!$_POST["y2"])
{
echo "<br><br>Fill the fourth number please<br><br>";
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "+" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " + " . $_POST["y"] . " + " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "+" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " + " . $_POST["y"] . " + " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) + ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "+" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " + " . $_POST["y"] . " + " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) + ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "+" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " + " . $_POST["y"] . " + " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) + ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "-" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " + " . $_POST["y"] . " - " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) - ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "*" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " + " . $_POST["y"] . " * " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) * ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "/" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " + " . $_POST["y"] . " / " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) / ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "-" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " + " . $_POST["y"] . " - " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) - ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "-" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " + " . $_POST["y"] . " - " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) - ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "-" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " + " . $_POST["y"] . " - " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "*" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " + " . $_POST["y"] . " * " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) * ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "*" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " + " . $_POST["y"] . " * " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) * ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "*" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " + " . $_POST["y"] . " * " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) * ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "/" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " + " . $_POST["y"] . " / " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) / ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "/" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " + " . $_POST["y"] . " / " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) / ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "/" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " + " . $_POST["y"] . " / " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] + $_POST["y"] ) / ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "+" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " - " . $_POST["y"] . " + " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "+" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " - " . $_POST["y"] . " + " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) + ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "+" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " - " . $_POST["y"] . " + " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) + ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "+" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " - " . $_POST["y"] . " + " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) + ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "-" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " - " . $_POST["y"] . " - " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) - ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "*" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " - " . $_POST["y"] . " * " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) * ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "/" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " - " . $_POST["y"] . " / " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) / ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "-" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " - " . $_POST["y"] . " - " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) - ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "-" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " - " . $_POST["y"] . " - " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) - ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "-" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " - " . $_POST["y"] . " - " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "*" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " - " . $_POST["y"] . " * " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) * ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "*" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " - " . $_POST["y"] . " * " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) * ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "*" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " - " . $_POST["y"] . " * " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) * ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "/" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " - " . $_POST["y"] . " / " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) / ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "/" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " - " . $_POST["y"] . " / " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) / ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "/" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " - " . $_POST["y"] . " / " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] - $_POST["y"] ) / ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "+" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " * " . $_POST["y"] . " + " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "+" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " * " . $_POST["y"] . " + " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) + ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "+" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " * " . $_POST["y"] . " + " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) + ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "+" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " * " . $_POST["y"] . " + " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) + ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "-" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " * " . $_POST["y"] . " - " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) - ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "*" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " * " . $_POST["y"] . " * " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) * ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "/" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " * " . $_POST["y"] . " / " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) / ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "-" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " * " . $_POST["y"] . " - " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) - ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "-" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " * " . $_POST["y"] . " - " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) - ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "-" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " * " . $_POST["y"] . " - " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "*" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " * " . $_POST["y"] . " * " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) * ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "*" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " * " . $_POST["y"] . " * " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) * ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "*" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " * " . $_POST["y"] . " * " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) * ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "/" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " * " . $_POST["y"] . " / " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) / ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "/" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " * " . $_POST["y"] . " / " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) / ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "/" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " * " . $_POST["y"] . " / " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] * $_POST["y"] ) / ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "+" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " / " . $_POST["y"] . " + " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "+" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " / " . $_POST["y"] . " + " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) + ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "+" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " / " . $_POST["y"] . " + " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) + ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "+" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " / " . $_POST["y"] . " + " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) + ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "-" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " / " . $_POST["y"] . " - " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) - ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "*" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " / " . $_POST["y"] . " * " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) * ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "/" and $_POST["oper3"] == "+")
{
echo $_POST["x"] . " / " . $_POST["y"] . " / " . $_POST["x2"] . " + " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) / ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "-" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " / " . $_POST["y"] . " - " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) - ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "-" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " / " . $_POST["y"] . " - " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) - ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "-" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " / " . $_POST["y"] . " - " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) + ( $_POST["x2"] + $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "*" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " / " . $_POST["y"] . " * " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) * ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "*" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " / " . $_POST["y"] . " * " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) * ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "*" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " / " . $_POST["y"] . " * " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) * ( $_POST["x2"] / $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "/" and $_POST["oper3"] == "-")
{
echo $_POST["x"] . " / " . $_POST["y"] . " / " . $_POST["x2"] . " - " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) / ( $_POST["x2"] - $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "/" and $_POST["oper3"] == "*")
{
echo $_POST["x"] . " / " . $_POST["y"] . " / " . $_POST["x2"] . " * " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) / ( $_POST["x2"] * $_POST["y2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "/" and $_POST["oper3"] == "/")
{
echo $_POST["x"] . " / " . $_POST["y"] . " / " . $_POST["x2"] . " / " . $_POST["y2"];
echo " = ";
echo ( $_POST["x"] / $_POST["y"] ) / ( $_POST["x2"] / $_POST["y2"] );
}
?>
</form>
</b>
</center>
</div>
</body>
</html>
results_way3.php :
PHP:
<html>
<head>
<title>Calculator Way 3</title>
</head>
<body background="./images/background.gif">
<style type="text/css">
body {
background-color: black;
background-repeat: repeat;
}
#site {
background-color: white;
background-repeat: repeat;
border-radius: 2px;
width: 600px;
padding-left: 10px;
}
</style>
<center>
<div id="site">
<b>
<font color="orange">
<form action="results_way3.php" method="post">
First number: <input type="number" name="x"><br>
First Operator: <input type="operator" name="oper"><br>
( Second Number: <input type="number" name="y"><br>
Second Operator: <input type="operator" name="oper2"><br>
Third Number: <input type="number" name="x2"><br>
<br><input type="submit" value="Go on..."><br>
<?php
if(!$_POST["x"])
{
echo "<br><br>Fill the first number please";
}
if(!$_POST["oper"])
{
echo "<br><br>Fill the first operator please";
}
if(!$_POST["y"])
{
echo "<br><br>Fill the second number please";
}
if(!$_POST["oper2"])
{
echo "<br><br>Fill the second operator please";
}
if(!$_POST["x2"])
{
echo "<br><br>Fill the third number please";
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "+")
{
echo "<br><br>";
echo $_POST["x"] . " + " . $_POST["y"] . " + " . $_POST["x2"];
echo " = ";
echo $_POST["x"] + ( $_POST["y"] + $_POST["x2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "-")
{
echo "<br><br>";
echo $_POST["x"] . " + " . $_POST["y"] . " - " . $_POST["x2"];
echo " = ";
echo $_POST["x"] + ( $_POST["y"] - $_POST["x2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "*")
{
echo "<br><br>";
echo $_POST["x"] . " + " . $_POST["y"] . " * " . $_POST["x2"];
echo " = ";
echo $_POST["x"] + ( $_POST["y"] * $_POST["x2"] );
}
if($_POST["oper"] == "+" and $_POST["oper2"] == "/")
{
echo "<br><br>";
echo $_POST["x"] . " + " . $_POST["y"] . " / " . $_POST["x2"];
echo " = ";
echo $_POST["x"] + ( $_POST["y"] / $_POST["x2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "+")
{
echo "<br><br>";
echo $_POST["x"] . " - " . $_POST["y"] . " + " . $_POST["x2"];
echo " = ";
echo $_POST["x"] - ( $_POST["y"] + $_POST["x2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "-")
{
echo "<br><br>";
echo $_POST["x"] . " - " . $_POST["y"] . " - " . $_POST["x2"];
echo " = ";
echo $_POST["x"] - ( $_POST["y"] - $_POST["x2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "*")
{
echo "<br><br>";
echo $_POST["x"] . " - " . $_POST["y"] . " * " . $_POST["x2"];
echo " = ";
echo $_POST["x"] - ( $_POST["y"] * $_POST["x2"] );
}
if($_POST["oper"] == "-" and $_POST["oper2"] == "/")
{
echo "<br><br>";
echo $_POST["x"] . " - " . $_POST["y"] . " / " . $_POST["x2"];
echo " = ";
echo $_POST["x"] - ( $_POST["y"] / $_POST["x2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "+")
{
echo "<br><br>";
echo $_POST["x"] . " * " . $_POST["y"] . " + " . $_POST["x2"];
echo " = ";
echo $_POST["x"] * ( $_POST["y"] + $_POST["x2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "-")
{
echo "<br><br>";
echo $_POST["x"] . " * " . $_POST["y"] . " - " . $_POST["x2"];
echo " = ";
echo $_POST["x"] * ( $_POST["y"] - $_POST["x2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "*")
{
echo "<br><br>";
echo $_POST["x"] . " * " . $_POST["y"] . " * " . $_POST["x2"];
echo " = ";
echo $_POST["x"] * ( $_POST["y"] * $_POST["x2"] );
}
if($_POST["oper"] == "*" and $_POST["oper2"] == "/")
{
echo "<br><br>";
echo $_POST["x"] . " * " . $_POST["y"] . " / " . $_POST["x2"];
echo " = ";
echo $_POST["x"] * ( $_POST["y"] / $_POST["x2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "+")
{
echo "<br><br>";
echo $_POST["x"] . " / " . $_POST["y"] . " + " . $_POST["x2"];
echo " = ";
echo $_POST["x"] / ( $_POST["y"] + $_POST["x2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "-")
{
echo "<br><br>";
echo $_POST["x"] . " / " . $_POST["y"] . " - " . $_POST["x2"];
echo " = ";
echo $_POST["x"] / ( $_POST["y"] - $_POST["x2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "*")
{
echo "<br><br>";
echo $_POST["x"] . " / " . $_POST["y"] . " * " . $_POST["x2"];
echo " = ";
echo $_POST["x"] / ( $_POST["y"] * $_POST["x2"] );
}
if($_POST["oper"] == "/" and $_POST["oper2"] == "/")
{
echo "<br><br>";
echo $_POST["x"] . " / " . $_POST["y"] . " / " . $_POST["x2"];
echo " = ";
echo $_POST["x"] / ( $_POST["y"] / $_POST["x2"] );
}
?>
</b>
</font>
</form>
</div>
</body>
</html>
Credits :
StronGCoder(me) - 100% for coding it !
hope you like it , if u wanna flame dont comment , rate ?/0!
Thanks!!!,
StronGCoder!!