14 | Image Insert to Mysql 15 |
16 |17 | Using input typt as file 18 |
19 | 20 | 21 |22 | Developed on 16 /3 / 2022 23 |
24 |25 | With JehanKandy 26 |
27 |├── LICENSE
├── README.md
├── all_image.php
├── config.php
├── images.sql
├── index.php
├── insert.php
└── style.css
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 JehanKandy
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Image-Insert-to-mysql-Database
2 | Image Insert to MySQL Database using PHP
3 |
4 |
5 | ********important*********
6 |
7 | all files must be in same folder.
8 | otherwise system does not working
9 |
10 |
11 | ****************************
12 | for .sql file
13 |
14 | 1. run xampp server
15 | 2. open web browser and type localhost/dashboard
16 | 3. go to phpmyadmin on top right
17 | 4. create databese named login
18 | 5. then press create
19 | 6. in tool bar of phpmyadmin click import
20 | 7. on choose file, select login.sql file and click go
21 | **************
22 |
23 | 8 .on path -> xampp/htdocs create a new folder named student
24 | 9. copy and past all files on to above created folder
25 | 10. Now open new tab and type localhost/student
26 |
27 |
28 | ************
29 |
--------------------------------------------------------------------------------
/all_image.php:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
100 | Image ID 101 | | 102 |103 | Image Name 104 | | 105 |106 | Date 107 | | 108 |
---|---|---|
117 | 118 | | 119 |120 | 121 | | 122 |123 | 124 | | 125 |
133 | image preview in next version 134 |
135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.0.3 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Mar 16, 2022 at 10:09 AM 7 | -- Server version: 10.4.14-MariaDB 8 | -- PHP Version: 7.2.34 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `image` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `images` 28 | -- 29 | 30 | CREATE TABLE `images` ( 31 | `id` int(10) NOT NULL, 32 | `image1` varchar(255) NOT NULL, 33 | `time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() 34 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 35 | 36 | -- 37 | -- Dumping data for table `images` 38 | -- 39 | 40 | INSERT INTO `images` (`id`, `image1`, `time`) VALUES 41 | (1, 'images.jpg', '2022-03-16 09:08:34'), 42 | (2, 'github.PNG', '2022-03-16 09:08:42'), 43 | (3, 'images.jpg', '2022-03-16 09:08:49'); 44 | 45 | -- 46 | -- Indexes for dumped tables 47 | -- 48 | 49 | -- 50 | -- Indexes for table `images` 51 | -- 52 | ALTER TABLE `images` 53 | ADD PRIMARY KEY (`id`); 54 | 55 | -- 56 | -- AUTO_INCREMENT for dumped tables 57 | -- 58 | 59 | -- 60 | -- AUTO_INCREMENT for table `images` 61 | -- 62 | ALTER TABLE `images` 63 | MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; 64 | COMMIT; 65 | 66 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 67 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 68 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 69 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |