* Sunda Cyber Army 2k17 *
Indonesia Defacer ~
<html>
<head>
<title>Search films</title>
</head>
<body>
<?php
$host = "webdev.iyaserver.com";
$userid = "[youruserid]";
$userpw = "[yourpw]";
$db = "[database name]";
include '../pdloginvariables.php';
$mysql = new mysqli(
$host,
$userid,
$userpw,
$db
);
if($mysql->connect_errno) {
echo "DB Connection problem: " .
$mysql->connect_error;
exit();
}
?>
<form action="results.php">
Title:<input type="text" name="title"><br>
Rating: <select name="rating">
<option value="ALL">Select a rating</option>
<option value="ALL">---------------</option>
<?php
$sql = "SELECT * FROM ratings";
$results = $mysql->query($sql);
while($currentrow = $results->fetch_assoc()) {
echo "<option>" .$currentrow["rating"] . "</option>";
}
?>
</select>
<br>
Genre: <select name="genre">
<option value="ALL">Select a genre</option>
<option value="ALL">---------------</option>
<?php
$sql = "SELECT * FROM genres WHERE genre != ''";
$results = $mysql->query($sql);
if(!$results) {
echo "SQL problem: " .
$mysql->error ;
exit();
}
while($currentrow = $results->fetch_assoc()) {
echo "<option>" . $currentrow["genre"]. "</option>";
}
?>
</select>
<br>
Sort order: <select name="sortorder">
<option>title</option>
<option>genre</option>
<option>rating</option>
</select>
<input type="submit">
</form>
</body>
</html>