Jump to content

User:Nmuliya1111

From Wikipedia, the free encyclopedia

/*Hello friend I am nmuliya1111. And I am create Addition two value in php language.*/

<?php

error_reporting(0);

if(isset($_POST["Addition"])){

$a=$_POST["txt1"];

$b=$_POST["txt2"];

$c=$a+$b;

}

?>

<!DOCTYPE html>

<html

<head>

<title>Addition operation</title>

</head>

<body>

<form action="" method="post">

<table border="1" align="center">

<tr>

<td colspan="2" align="center">Addition</td>

</tr>

<tr>

<td>Number A </td>

<td><input type="txt" name="txt1"  placeholder="Enter A" required value="<?php echo $a ?>"></td>

</tr>

<tr>

<td>Number B </td>

<td><input type="txt" name="txt2" placeholder="Enter B" required value="<?php echo $b ?>"></td>

</tr>

<tr>

<td colspan="2" align="center"><input type="submit" name="Addition" value="Addition"></td>

</tr>

<tr>

<td>Answer is </td>

<td><input type="txt" name="txt3" placeholder="Answer" value="<?php echo $c ?>"></td>

</tr>

</table>

</form>

</body>

</html>