Hello friends of the community. I’m storing information in my MySQL database using this code: class crud { private $db; function __construct($DB_con) { $this->db = $DB_con; } public function create($fname,$lname,$email,$contact,$nimagen) { try { $stmt = $this->db->prepare("INSERT INTO tbl_users(first_name,last_name,email_id,contact_no) VALUES(:fname, :lname, :email, :contact)"); $stmt->bindparam(":fname",$fname); $stmt->bindparam(":lname",$lname); $stmt->bindparam(":email",$email); $stmt->bindparam(":contact",$contact); $stmt->execute(); return true; } catch(PDOException $e) { echo $e->getMessage(); […]
The post Storing image MySQL database with PHP PDO appeared first on BlogoSfera.