Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /home/dent/public_html/_demos/
File Upload :
Current File : /home/dent/public_html/_demos/search.php

<html>
<head>
    <title>Search films</title>
</head>
<body>
<form action="results.php">
    Title:<input type="text" name="title"><br>


    <?php

    $host = "webdev.iyaclasses.com";
    $userid = "<youruserid>";
    $userpw = "<yourpw>";
    $db = "<database name>";

    include '../pdloginvariables.php'; // you can ignore/skip this line

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

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

    $sql = "SELECT * FROM ratings WHERE rating != 'NC-17'"; // SQL statement to submit to db

    $results = $mysql->query($sql);

    if(!$results) {
        echo "SQL error: ". $mysql->error;
        exit();
    }



    ?>
    Rating: <select name="rating">
        <option selected="1">Any</option>

        <?php

        while($currentrow = $results->fetch_assoc()) {
            echo "<option>" . $currentrow["rating"] . "</option>";
        }


        ?>

    </select>
    <br>
    Genre: <select name="genre">
        <option>Sci-fi</option>
        <option>Comedy</option>
        <option>Action/Adventure</option>
    </select>
    <br>
    Sort order: <select name="sortorder">
        <option>title</option>
        <option>genre</option>
        <option>rating</option>
    </select>

    <input type="submit">
</form>

</body>
</html>