Upload, Insert, Update, Delete an Image Using PHP MySQL

April 24, 2017 | Author: Walter Buyela | Category: N/A
Share Embed Donate


Short Description

Download Upload, Insert, Update, Delete an Image Using PHP MySQL...

Description

Upload, Insert, Update, Delete an Image using PHP  MySQL  On 2/06/2016 By Pradeep Khodke 

  Hello friends, after a long time i am going to post a simple tutorial yet useful in your web application or  project, Simple Insert, Select, Update and Delete (CRUD) with Image using PDO Query. an Image will be  Uploaded, Inserted, Updated and Deleted as well with MySQL. we already have a CRUD Tutorials but i  haven't covered this, this tutorial is covered with proper image validation, let say only valid image extensions  are allowed to upload and image size is also matters. So let'see image upload in php. 

Database / Table  "testdb" named database is used in this tutorial, so create it and paste the following sql code in your  phpmyadmin it will create users table "tbl_users". 

CREATE TABLE IF NOT EXISTS `tbl_users` (    `userID` int(11) NOT NULL AUTO_INCREMENT,    `userName` varchar(20) NOT NULL,    `userProfession` varchar(50) NOT NULL,    `userPic` varchar(200) NOT NULL,    PRIMARY KEY (`userID`)  ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=51 ; 

  now we have to create only 4 files php files which will handle our crud operations with an image and they are  as follow.  

 

Dbconfig.Php  simple host/database configuration file created with PDO Query/Extension. change the credentials as per  your configuration. 

                 
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF