Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


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

<?php
$host = "webdev.iyaserver.com";
$userid = "[youruserid]";
$userpw = "[yourpw]";
$db = "[database name]";

include '../pdloginvariables.php';
/*
    Note: I have "included" a file that sets the values for
    $userid and $userpw for ME...
    In YOUR code, you will need to fill in your id and pw
*/

// echo "hello " . $_REQUEST["fullname"] . "!<br><br>";

$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> ".
    "and returned " . $results->num_rows . " records!<hr><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()) {
    ?>
    <div class="title">
        <?php  echo $currentrow['title']; ?>
    </div>
    <div class="rating">
        <?php echo $currentrow['rating']; ?>
    </div>
    <div class="label">
        <?php echo $currentrow['label']; ?>
    </div>
    <br style="clear:both;">
<?php
} // end loop
?>