Part 14-[A]-Admin Panel(IMAGE-CRUD): How to Insert/Upload Image in PHP

Part 14-[A]-Admin Panel(IMAGE-CRUD): How to Insert/Upload Image in PHP

Funda Of Web IT

5 лет назад

74,200 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

ankit battersea
ankit battersea - 01.04.2022 13:39

love you bro...

Ответить
Mohammad suleman khan
Mohammad suleman khan - 27.01.2022 16:52

sir blog waly page ka code chaye

Ответить
Terminator G
Terminator G - 18.08.2021 08:46

just so you know guys the image size matters.. I uploaded a 2.55mb image and it didn't work... then i tried a 1.2mb image and it worked.......

hope I have helped someone

Ответить
Qurban Ali
Qurban Ali - 30.07.2021 09:18

share code

Ответить
Nonthapat Jamjai
Nonthapat Jamjai - 16.07.2021 14:11

Help I have this error:
Warning: Undefined array key "profileimg_regis" in C:\xampp\htdocs\DeknoinarakDev\dashboard\run\code.php on line 102

Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\DeknoinarakDev\dashboard\run\code.php on line 102

Ответить
Deeksha Awasthi
Deeksha Awasthi - 16.07.2021 10:37

Sir iska code provide kra dijiye

Ответить
Diego D4
Diego D4 - 23.06.2021 14:25

Have a download source code?

Ответить
Cotton Valley
Cotton Valley - 02.06.2021 05:07

can you give the source code?

Ответить
Kian Nicholas Sosoban
Kian Nicholas Sosoban - 31.05.2021 10:43

why do i get img already exist?

Ответить
Saba Sharashenidze
Saba Sharashenidze - 13.05.2021 21:02

Hello, why I can not upload big images? 7mb or 10mb

Ответить
ANURAG DWIVEDI
ANURAG DWIVEDI - 06.04.2021 11:48

Dear sir plz provide the source code

Ответить
HKagiri
HKagiri - 14.03.2021 13:04

By any chance can you do a video or file upload

Ответить
Tech LionSL
Tech LionSL - 13.03.2021 21:46

some code missing Dear

Ответить
JAYROSE PACIENTE
JAYROSE PACIENTE - 19.02.2021 06:22

move_uploaded_file($_FILES["student_image"]["tmp_name"], "upload/".$_FILES["student_image"]["name"]);

Sir I can save image in my database but my problem is why I can not store the image that I save in the upload folder "upload/" What is the problem of this sir?

Ответить
JAYROSE PACIENTE
JAYROSE PACIENTE - 18.02.2021 17:01

Thank you sir for your nice tutorial! I can add image now :)

Ответить
Saurav Karmakar
Saurav Karmakar - 16.01.2021 07:50

Project ka naam..online tender invitation ha..


Admin usme tender add, update and delete karga.. aur field sirf tender name, description,file diya ha..



Client side me ..navbar me .homepage ha,admin login ha aur tender ha...tender me click karne se ..card jeisa tender display hoga aur sath me wahi tender ka file ka link rahega...abb uss link me file ko downloadable keisa banao.... please help bohot bohot urgent ha...kal submit karna ha...ekk chiz k atak gaya hu bhai..

Ответить
Lukman Rosdin
Lukman Rosdin - 24.12.2020 10:21

how can i make modal button for regiser edit button sir pls teach me

Ответить
Miruna Andriesei
Miruna Andriesei - 16.11.2020 19:56

i made it work like this for me: from this $query = "INSERT INTO faculty ('name', 'design', 'description', 'images') VALUES ('$name','$designation', '$description', '$images')"; to this $query = "INSERT INTO faculty (name, design, description, images) VALUES ('$name','$designation', '$description', '$images')"; the '...' were the problem for me

Ответить
SLAnonymous
SLAnonymous - 26.10.2020 15:16

description you give discript diffrent name but db how was save

Ответить
Charlotte Chee
Charlotte Chee - 17.10.2020 13:13

Hi, I follow your steps to do, but when i add image, my addstaff page is blank.

Ответить
tanjim ashraf
tanjim ashraf - 24.08.2020 17:51

This method doesn't work for, though I made another alternative since I'd done a similar task earlier. But I'm loving the whole video series so far.

Ответить
Wwe Network - WR3D
Wwe Network - WR3D - 08.08.2020 02:12

This video isn't working for me, I have tried everything I know

Ответить
Ian Parsons
Ian Parsons - 09.07.2020 00:15

Can we see the source code as I have got to part 14 and this is the one I cannot get to work.

Ответить
Tharindu Madushan
Tharindu Madushan - 06.07.2020 11:23

Can you provide the sourse code?

Ответить
André Campos
André Campos - 02.07.2020 15:52

hi can you send me the code and the database please ?

Ответить
Rohit Sahu
Rohit Sahu - 12.05.2020 14:54

<?php
include('dbconfig.php');
if (isset($_POST['save_faculty'])) {
$name = $_POST['faculty_name'];
$designation = $_POST['faculty_designation'];
$description = $_POST['faculty_description'];
$images = $_FILES["faculty_image"]['name'];

if (file_exists("upload/" . $_FILES['faculty_image']['name'])) {
$store = $_FILES["faculty_image"]["name"];
$_SESSION['status'] = "image already exists. '.$store.'";
header('Location:faculty.php');
} else {


$query = "INSERT INTO faculty ('name','desig','descri','images') VALUES ('$name','$designation','$description','$images')";
$query_run = mysqli_query($connection, $query);

if ($query_run) {

move_uploaded_file($_FILES["faculty_image"]["tmp_name"], "upload/" . $_FILES["faculty_image"]["name"]);
$_SESSION['success'] = "faculty is Added Successfully";
header('Location: faculty.php');
} else {
echo "not done";
$_SESSION['success'] = "Faculty Not Added";
header('Location: faculty.php');
}
}
}

Ответить
Rohit Sahu
Rohit Sahu - 12.05.2020 14:53

Data Not inserting

Ответить
Priyank Yadav
Priyank Yadav - 17.04.2020 22:38

Hello

Ответить
Priyank Yadav
Priyank Yadav - 17.04.2020 22:37

Vs code kaise setup kare for PHP, iss par ek video banao

Ответить
Mr. Rkay Ji
Mr. Rkay Ji - 10.04.2020 20:47

hello sir can you provide the source code of this because images is not uploaded in database

Ответить
ShadowTech Harmonies
ShadowTech Harmonies - 02.04.2020 09:36

@Funda Of Web IT 500 internal server error with type 302 data cannot be inserted to db.

Ответить
Ribal Haddad
Ribal Haddad - 08.03.2020 14:15

Hello sir it not working help plz
if(isset($_POST['save_albums']))
// {
// $name = $_POST['album_name'];
// $designation = $_POST['album_designation'];
// $images = $_FILES["album_image"]["name"];

// if(file_exists("uploads/" .$_FILES["album_image"]["name"]))

// {
// $store = $_FILES["album_image"]["name"];
// $_SESSION['status'] = "Image already exists.'.$store.' ";
// header('Location: albums.php');
// }

// else
// {

// $query = "INSERT INTO albums ('name','designation','images') VALUES ('$name','$designation','$images')";
// $query_run = mysqli_query($connection,$query);

// if($query_run)
// {
// move_uploaded_file($_FILES["album_image"]["tmp_name"], "uploads/".$_FILES["album_image"]["name"]);
// $_SESSION['success'] = "Image Added";
// header('Location: albums.php');
// }
// else
// {
// $_SESSION['status'] = "Image Not Added";
// header('Location: albums.php');
// }
// }
// }
This is my code

Ответить
R͜͡ifat A͜͡hmed S͜͡ajeeb
R͜͡ifat A͜͡hmed S͜͡ajeeb - 11.01.2020 20:02

Thanks again. Your all coding are awesome. But I think , It will be more better if you upload the source code.

Ответить
Swati Sandanshiv
Swati Sandanshiv - 08.01.2020 16:01

Hey any1 share me the code plzz... I badly need it..

Ответить
Rakshith Suvarna
Rakshith Suvarna - 17.12.2019 19:09

I am student at Srinivas University persuing BCA in cloud technology and information security so i need your help

Ответить
Rakshith Suvarna
Rakshith Suvarna - 17.12.2019 19:07

Help me

Ответить
Rakshith Suvarna
Rakshith Suvarna - 17.12.2019 19:07

Sir can u share u r whatsapp number muje aaapse bohat kuch seekna hai so plz.......

Ответить
Smm desk
Smm desk - 12.12.2019 14:20

can you provide this video source code ?

Ответить
Jeevan More
Jeevan More - 09.12.2019 13:05

mera data bhi insert nahi horha database main

Ответить
Aabish
Aabish - 09.09.2019 10:45

mera data hi insert ni horaha plzz bataden :-'

Ответить
Mihaela Maxim
Mihaela Maxim - 06.06.2019 11:15

Hello, great tutorial! Can you provide the sourse code?

Ответить