HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/www/api.beatleanalytics.com/basite/getlistbytype.php
<?php 
$response = array();

// include db connect class
require_once '../db_connect.php';

// connecting to db
$db = new DB_CONNECT();


if (isset($_GET["type"])) {
	$result = mysql_query("SELECT * FROM beatle_review WHERE restType = '".$type."' and status = 'Y' ")or die(mysql_error());
	// check for empty result
    if (mysql_num_rows($result) > 0) {
        $response["data"] = array();

        while ($row = mysql_fetch_object($result)) {
        // temp user array
	        // $lists = array();
	        // $lists["indId"] = $row["IndId"];
	        // $lists["indName"] = $row["db_industry"];
	        // $lists["indLoginId"] = $row["db_IndLoginId"];
	        // $lists["pagesId"] = $row["db_pagesId"];
	        // $lists["keywordName"] = $row["keywordName"];
	        // $lists["indTypeId"] = $row["db_ind_type_id"];
	        
	       
	        array_push($response["data"], $row);
	     }
	    // success
	    $response["success"] = "true";
	    $response["message"] = "success";


	    // echoing JSON response
	     echo json_encode($response);
	 } else {
	    // no products found
	    $response["success"] = "false";
	    $response["message"] = "type not found";

	    // echo no users JSON
	    echo json_encode($response);
	}
}else {
    // required field is missing
    $response["success"] = "false";
    $response["message"] = "Required field(s) is missing";

    // echoing JSON response
    echo json_encode($response);
}
?>