bylletski Posted March 16, 2013 Share Posted March 16, 2013 (edited) Hello i want to $one + $two and then get the answer but i have stuck right now. <?php $one = $_POST['one']; $two = $_POST['two']; if(isset($_POST['button'])) { if ($one + $two) { echo ; } } ?> <form method="post" action="new.php"> <input type="text" name="one">+ <input type="text" name="two"> <input type="submit" name="button"> </form> Edited March 17, 2013 by ignace Added code tags Quote Link to comment https://forums.phpfreaks.com/topic/275752-trying-to-make-a-math-thing-with-variabels/ Share on other sites More sharing options...
bylletski Posted March 16, 2013 Author Share Posted March 16, 2013 (edited) Never mind i figure it out. <?php $one = $_POST['one']; $two = $_POST['two']; if(isset($_POST['button'])) { echo $one + $two; } ?> <form method="post" action="new.php"> <input type="text" name="one">+ <input type="text" name="two"> <input type="submit" name="button"> </form> Edited March 17, 2013 by ignace Added code tags Quote Link to comment https://forums.phpfreaks.com/topic/275752-trying-to-make-a-math-thing-with-variabels/#findComment-1419063 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.