* Sunda Cyber Army 2k17 *
Indonesia Defacer ~
<?php
if(empty($_REQUEST['recordid'])) {
echo "Please go through <a href='search_drilldown.php'>search</a> page.";
exit();
}
$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();
}
?>
<html>
<head>
<title>Drill down: Movie Details</title>
<style>
body {
background-color: burlywood;
margin: 0 200px;
text-align: center;
}
#container {
padding: 30px;
margin-top: 100px;
background-color: olive;
width: 650px;
text-align: left;
color:white;
}
.label {
float:left;
clear:both;
width: 120px;
}
.title {
width: 500px;
float:left;
}
.link {
width: 100px;
float:left;
margin-left: 50px;
}
</style>
</head>
<body>
<div id="container">
<h1> Edit Movie <hr></h1>
<?php
$sql = "SELECT * from movieView2 WHERE dvd_title_id = " .
$_REQUEST['recordid'];
$results = $mysql->query($sql);
if(!$results) {
echo "<hr>Your SQL:<br> " . $sql . "<br><br>";
echo "SQL Error: " . $mysql->error . "<hr>";
exit();
}
$recorddata = $results->fetch_assoc();
?>
<form action="update_drilldown_finished.php">
<input type="hidden" name="recordid"
value="<?php echo $recorddata["dvd_title_id"]; ?>">
<em>Title:</em>
<input type="text" name="title"
value="<?php echo $recorddata['title']; ?> ">
<strong>
</strong>
<br>
<em>Rating:</em>
<select name="rating">
<?php
echo "<option value='".
$recorddata["rating_id"] .
"'>" .
$recorddata['rating'] .
"</option>";
$ratingsql = "SELECT * FROM ratings";
$ratingresults = $mysql->query($ratingsql);
while($currentrow = $ratingresults->fetch_assoc()) {
echo "<option value='" .
$currentrow["rating_id"] .
"'>" .
$currentrow["rating"].
"</option>";
}
?>
</select>
<br>
<em>Genre:</em>
<select name="genre">
<?php
echo "<option value='".
$recorddata["genre_id"] .
"'>" .
$recorddata['genre'] .
"</option>";
$genresql = "SELECT * FROM genres";
$genreresults = $mysql->query($genresql);
while($currentrow = $genreresults->fetch_assoc()) {
echo "<option value='" .
$currentrow["genre_id"] .
"'>" .
$currentrow["genre"].
"</option>";
}
?>
</select>
<br> <br>
<input type="submit" value="Save Movie Edits">
</form>
</div>
</body></html>