Security of a custom table in JsGrid This is my old topic,it is about show table's records by JavaScript using a JsGrid file and can edit or delete by ajax.

This is my topic How can I load rows in JsGrid table that got from php file?,
The problem I am not sure the data is secure during inserting and loading or not?

Is it really secure?

The names of PHP files are: newsConf, controll and getnewscat

HTML file: basic.html

in controll.php:

public function newsConfig(){ $this-&gt;CONN = new Conn();//class from external page to connect DB try{
    $dfnet = $this-&gt;CONN-&gt;open_connect();
    $qnco = mysqli_query($dfnet,"select * from category");
    if(!$qnco) return "";
    else{
        while($qncoarray = mysqli_fetch_assoc($qnco)){
            //here I try copy rows into array
            $nnopCo[] = array(
                'ID' =&gt; $qncoarray['ID'],
                'Name' =&gt; $qncoarray['Name']
            );
        }
        return $nnopCo;
    }
    $this-&gt;CONN-&gt;close_connect($dfnet); } catch(Exception $er){ }


in getnewscat.php:

&lt;?php require_once "../../bin/controll.php";
$db_controll = new Controll();
$cat_news = new ArrayObject($db_controll-&gt;newsConfig());

header('Content-type: application/json');
echo json_encode($cat_news-&gt;getArrayCopy());

?&gt;


in basic.html: is the same file from jsgrid demo, but I change the code in JavaScript and canceled the db.js file

    &lt;script&gt;
            $(function() {
                {

                $("#jsGrid").jsGrid({
                    height: "70%",
                    width: "50%",//100%
                    selecting: false,
                    filtering: false,
                    editing: false,
                    sorting: false,
                    paging: true,
                    autoload: true,
                    pageSize: 15,
                    pageButtonCount: 5,
                    controller: {
                        loadData: function(filter) {
return $.ajax({url: "../bin/getnewscat.php",data:filter
                            });

                        }
    },
                    fields: [
                        { name: "ID", type: "number", width: 50 },
                        { name: "Name", type: "text", width: 50},
                        { type: "control", modeSwitchButton: false, deleteButton: false }
                    ]
               });
    $(".config-panel input[type=checkbox]").on("click", function() {
                    var $cb = $(this);
                    $("#jsGrid").jsGrid("option", $cb.attr("id"), $cb.is(":checked"));
                });

            });
        &lt;/script&gt;


In newsConf.php: that file should call basic.html and give the result by using an iframe:

&lt;iframe name="demo" src="jsgrid-1.2.0/demos/basic.html"&gt;&lt;/iframe&gt;
As far as I can see you are not using user input in your queries so there really isn't any security issue. When using user input in queries always make sure it's through prepared statements.