* 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 error : " . $mysql->connect_error;
exit();
}
?>
<form action="results_final2.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);
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
WHERE genre != '' AND genre != ' '
ORDER BY genre";
$results = $mysql->query($sql);
if(!$results) {
echo "SQL error: ". $mysql->error;
exit();
}
?>
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>";
}
?>
</select><br>
Sort order: <select name="sortorder">
<option>title</option>
<option>genre</option>
<option>rating</option>
</select><br>
<input type="submit">
</form>
</body>
</html>