Multiple image upload to database and display from it
Upload image into the database and retrieve from it Video: Multiple image upload and display from database Create the database name as 'image' and just copy this table given below Database CREATE TABLE IF NOT EXISTS `multiple` ( `id` int(255) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `image` longblob NOT NULL, PRIMARY KEY (`id`) ) Html: In this form tag make sure that you set the '[ ]' in the input tag and 'multiple' use to select the multiple image PHP: (upload and display) mysql_connect("localhost","root",""); mysql_select_dB("image"); if(isset($_POST["submit"])){ $filename = $_FILES['img']['name']; $file_tmp = $_FILES['img']['tmp_name']; $filetype = $_FILES['img']['type']; $filesize = $_FILES['img']['size']; for($i=0; $i<=count($file_tmp); $i++){ if(!empty($file_tmp[$i])){ $name = addslash
Comments
Post a Comment