the PDO conneciton is:
public function __construct(){
$this->conn = new PDO("mysql:host=localhost;dbname=dms","root","");
$this->conn->exec("SET CHARACTER SET utf8");
}
now here is the function to get the result of the required rows.
public function getAny() {
$stmt9 = $this->conn->prepare("SELECT * FROM " . self::$table_name);
$stmt9->execute();
return $stmt9 = $stmt9->fetchAll();
}
after this on view we will fetch out the rows after running the function. this is the view.php
$doc = $organ->getAny();
if(count($doc)){
foreach($doc as $data){
echo $data['id'] . "<br />";
echo $data['nameARABIC'] . "<br />";
}
is this view.php secure and what else should i do for securing more. regards