Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /home/dent/public_html/exams/venus/
File Upload :
Current File : /home/dent/public_html/exams/venus/examsearch.php

<?php
var_dump($_REQUEST);

$host ="webdev.iyaserver.com"; //creatign connection to the database + details
$userid="dent_test";
$userpw="Acad276_Ttrojan_Dev2Ex@m";
$db ="dent_exam";

$mysql = new mysqli($host, $userid, $userpw, $db);

if($mysql->connect_errno) {
    echo "db connection error : " . $mysql->connect_error;
    exit();
}
?>

<html>

<head lang="en">

    <meta charset="UTF-8">

    <title>Acad276 Practical Exam: Search</title>

    <style>

        h1 {

            margin: auto;

            text-align: center;

            background-color:   #900;

            color:  #FC0;

        //            height: 60px;

            line-height: 60px;

        }

        h2 {

            margin: auto;

            text-align: center;

            padding:  30px;

        }

        .container {

            width:  400px;

            margin: auto;

            border: 1px solid red;

        }

        .left-col, .right-col {

            float:  left;

            width:  100%;

            height: 280px;

            border: 1px solid #990000;

        }

        .label, .input {

            float:  left;

            width:  130px;

            margin: 3px;

        }

        .label {

            margin-left: 40px;

        }

        .input>input, .input>select {

            width:  100%;

        }

        .search-submit {

            margin-top: 20px;

            margin-left: 170px;

            width:  80px;

        }

    </style>

</head>

<body>

<div class="container">

    <h1>Mobile Devices Database</h1>

    <div class="left-col">

        <h2>Search the Database</h2>

        <form method="get" action="examresult.php">

            <div class="label">Device Name:</div>

            <div class="input">

                <input type="text" name="device_name"/>

            </div>

            <br clear="all"/>



            <div class="label">Manufacturer :</div>



            <!-- i mention this in my results page as well but my sql statement isnt conencting proeprly in order to output the proper names and detaisl of each field and onyl display the correct info but in number form than the ideal form for a user whoch again is somethign to correct -->

            <div class="input">

                <select name="manufacturer_id">
                    <option value="ALL">-----Pick a manu.--------</option>
                    <?php
                    $sql = "SELECT * FROM `make`";
                    $results = $mysql->query($sql);
                    if (!$results) {
                        echo "<hr> ERROR! " . $mysql->error;
                        echo "<hr>SQL: " . $sql;
                        exit();
                    }
                    while($currentrow = $results->fetch_assoc()) {
                        echo "<option>" . $currentrow["manufacturer_id"] . "</option>";
                    }
                    ?>

                </select>






            </div>

            <br clear="all"/>



            <div class="label">Operating System:</div>

            <div class="input">


                <select name="system_id">
                    <option value="ALL">-----Pick a operating system.--------</option>
                    <?php
                    $sql = "SELECT * FROM `os`";
                    $results = $mysql->query($sql);
                    if (!$results) {
                        echo "<hr> ERROR! " . $mysql->error;
                        echo "<hr>SQL: " . $sql;
                        exit();
                    }
                    while($currentrow = $results->fetch_assoc()) {
                        echo "<option>" . $currentrow["system_id"] . "</option>";
                    }
                    ?>

                </select>



            </div>

            <br clear="all"/>



            <div class="label">Type:</div>

            <div class="input">

                <select name="type_id">
                    <option value="ALL">-----Pick a operating system.--------</option>
                    <?php
                    $sql = "SELECT * FROM `devicetype`";
                    $results = $mysql->query($sql);
                    if (!$results) {
                        echo "<hr> ERROR! " . $mysql->error;
                        echo "<hr>SQL: " . $sql;
                        exit();
                    }
                    while($currentrow = $results->fetch_assoc()) {
                        echo "<option>" . $currentrow["type_id"] . "</option>";
                    }
                    ?>

                </select>



            </div>

            <br clear="all"/>



            <input class="search-submit" type="submit" value="Search"/>

        </form>

    </div>

    <br clear="all"/>

</div>

</body>








</html>