Sunda Cyber Army


* Sunda Cyber Army 2k17 *
Indonesia Defacer ~


Path : /home/dent/public_html/demo4a/
File Upload :
Current File : /home/dent/public_html/demo4a/results_old.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 problem: " .
        $mysql->connect_error;
    exit();
}

$sql = "SELECT * FROM movieView
        WHERE 
        title LIKE '" . $_REQUEST["title"] . "%'";

if($_REQUEST["rating"] != "ALL"){
        $sql .= "
                AND 
                rating = '" . $_REQUEST["rating"] . "'";
}

if($_REQUEST["genre"] != "ALL"){
        $sql .= "    
                AND 
                genre = '" . $_REQUEST["genre"]. "'";
}

$sql .= " ORDER BY " . $_REQUEST["sortorder"];

  echo "<hr>SQL=" . $sql . "<hr>";
$results = $mysql->query($sql);

if(!$results) {
    echo "SQL problem: " .
        $mysql->error ;
    exit();
}

// print_r($_REQUEST);

echo "Your search returned " . $results->num_rows . " records";


while($currentrow = $results->fetch_assoc()) {
    echo $currentrow["title"] . "<br>";
}