Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /home/dent/public_html/demo3b/
File Upload :
Current File : /home/dent/public_html/demo3b/filmresults2.php

<?php

echo "FORM \$_REQUEST object/variable debug info:<br>";
print_r($_REQUEST);
echo "<hr>";

$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();
} else {
    echo "db connection success!<br><br>";
}

/*$conn = mysqli_connect(
    "acad.itpwebdev.com",
    $userid,
    $userpw,
    "dent_dvd");
if(mysqli_connect_errno()) {
    echo "Failed to connect to mySql with userID " . $userid .
        "received error: " . mysqli_connect_errno();
    exit();
}

echo "connection success! ";


$results = mysqli_query($conn, $sql);
if(!$results) {
    exit("SQL Error: " . mysqli_error($conn));
}


*/

$sql = "
        SELECT * from movieView 
        WHERE genre LIKE '" . $_REQUEST['genre'] . "%'";
/* write SQL command, store in variable for ease of use */
echo "<hr> sql submitted:<br>" . $sql . "<hr>";

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

if(!$results) {
    echo "SQL error: ". $mysql->error;
    exit();
} else {
    echo "all good... here come the results...<br><br>";
}

echo "You were searching for the genre <strong>" . $_REQUEST['genre'] . "</strong><br> ";
echo $results->num_rows . " records returned!<br><br>";

?>

    <style>
        .title {
            width: 600px;
            float: left;
            font-weight: bold;
            background-color: yellow;
        }

        .rating {
            width: 100px;
            float: left;
            font-style: italic;
            background-color: aliceblue;
            text-align: center;
        }

        .label {
            width: 300px;
            float: left;
            background-color: azure;
        }
    </style>

    <div class="title">Title:<hr></div>
    <div class="rating">Rating:<hr></div>
    <div class="label">Label::<hr></div>
    <br style="clear:both;">

<?php
while($currentrow = $results->fetch_assoc()) {
    echo '<div class="title">' .
            $currentrow['title'] .
        '</div>';
    echo '<div class="rating">' .
            $currentrow['rating'] .
            '</div>';
    echo '<div class="label">' .
            $currentrow['label'] .
            '</div>';
    echo '<br style="clear:both;">';
}
?>