Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


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

<?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();
} 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>";

while($currentrow = $results->fetch_assoc()) {
    echo "<strong>" .
        $currentrow['title'] .
        "</strong> <em>(Rated " .
        $currentrow["rating"] .
        ")</em><br>";
}
?>