<?php if(isset($_POST['submit'])){ $A= $_POST['A'];// (let the value of A be 10 and B be 20) $B= $_POST['B']; $A=$A+$B; //adding the value of both variable in A now A=30 $B=$A-$B; // now the value of B is 10 $A=$A-$B; // now the value of A is 20 echo "Value of A is ".$A."<br>"; echo "Value of B is ".$B; } ?> <html> <head> <title>Swipe</title> </head> <body> <form action="" method='POST'> <label for="number">Please Enter the value of A</label> <input type="text" name="A" value=""> <br><br> <label for="number">Please Enter the value of B</label> <input type="text" name="B" value=""> <br><br> <input type="submit" value="Done" name="submit"> </form> </body> </html>
Stay tuned for the PHP Magento, WordPress and Magento2 latest tutorial and updates, Hope you enjoyed reading, if you need the professional Magento Development / PHP we can help you, just Click on the Link and send me your requirements.
Please Like the Post on Facebook or Google+.