Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /proc/self/cwd/
File Upload :
Current File : //proc/self/cwd/search.php


<html>
<head>
    <title>Search films</title>
</head>
<body>
<form action="results.php">
    Title:<input type="text" name="title"><br>
Rating: <select name="rating">
    <option>G</option>
    <option selected=''>PG</option>
    <option>PG-13</option>
    <option>R</option>
    </select>
    <br>

<?php

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

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();
} else {
    echo "db connection successful";
}

$sql = "SELECT * from genres WHERE genre != '' AND genre != ' ' "; // SQL statement to submit to db

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

if(!$results) {
    echo "SQL error: ". $mysql->error;
    exit();
} else {
    echo "Your search returned " . $results->num_rows . " results.<br>";
}


?>
Genre: <select name="genre">
        <option value="ALL">Select a genre</option>
        <option value="ALL">--------------------------</option>
<?php
        while($currentrow = $results->fetch_assoc()) {
            echo "<option>" . $currentrow["genre"] . "</option>";
        }

?>

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