Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="de">
- <head>
- <meta charset="utf-8">
- <title>dEn Cliqulatoz</title>
- <h1>THe KLaCULATIOR</h1>
- </head>
- <body bgcolor="#FF00FF" background="http://bestanimations.com/Animals/Birds/Parrots/animated-parrot-gif-2.gif">
- <form method="post" attribute="post" >
- <p>First Value:<br/>
- <input type="text" id="first" name="first"></p>
- <p>Second Value:<br/>
- <input type="text" id="second" name="second"></p>
- <!--
- <input type="radio" name="group1" id="add" value="add" checked="true"><p>+</p><br/>
- <input type="radio" name="group1" id="subtract" value="subtract"><p>-</p><br/>
- <input type="radio" name="group1" id="times" value="times"><p>x</p><br/>
- <input type="radio" name="group1" id="divide" value="divide"><p>/</p><br/>
- <p></p>
- -->
- <button type="submit" name="group1" id="add" value="add">+</button>
- <button type="submit" name="group1" id="subtract" value="subtract">-</button>
- <button type="submit" name="group1" id="times" value="times">*</button>
- <button type="submit" name="group1" id="divide" value="divide">/</button>
- <p>
- answer
- <p>
- <?php
- $first = $_POST['first'];
- $second = $_POST['second'];
- if($_POST['group1'] == 'add') {
- echo $first + $second;
- }
- else if($_POST['group1'] == 'subtract') {
- echo $first - $second;
- }
- else if($_POST['group1'] == 'times') {
- echo $first * $second;
- }
- else if($_POST['group1'] == 'divide') {
- echo $first / $second;
- }
- ?>
- </form>
- </body>
- </html>
RAW Paste Data