Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


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

<?php

$host = "webdev.iyaserver.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();
}

?>
<html>
<head>
    <title>Search films</title>
</head>
<body>
<form action="results.php">
    Title:<input type="text" name="title"><br>
    Rating: <select name="rating">
        <?php
    $sql = "SELECT * from ratings";

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

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

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

        ?>

    </select>
    <br>
    <?php
    $sql = "SELECT * from genres";

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

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

    echo 'Genre: <select name="genre">';

    echo "<option>ALL</option>";

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

    echo "</select>";
    ?>

<!--    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>