Delete user comment messages from database with PHP - PHP tutorial

preview_player
Показать описание
Delete comment messages from database using PHP - Learn PHP backend programming. Today we will set up a script that allow for us to delete comments from our comment section.

--

mmtuts is a YouTube channel that focuses on teaching beginner and advanced courses in various multimedia related skills.
We plan to make tutorials available on programming, video production, animation, graphic design, and on software such as the Adobe Creative Cloud programs.

PHP for beginners is a how to series that teaches the PHP coding language to people who are just starting out learning programming. The course teaches how PHP scripting can be made easy and teaches how to build many apps such as a login system, a comment section, how to upload images, how to create users in a website, and much more. Creating dynamic websites with PHP is easy and should not be seen as otherwise, which is why we want to explain the language in a easy to understand way for beginners.

If you have suggestions on new courses, or specific lessons within existing courses you would like to see, then feel welcome to submit them in the comment section or in a private message. ALL suggestions will be seen, but not all will be replied to since we get quite a few every day.
Рекомендации по теме
Комментарии
Автор

so far so good.. all is working.. i will definitely recommend this to all my friends.. greatful I found this tutorial.. Thank you sir.

nelsirc
Автор

I am learning a lot teach. I added some modifications to my form:

1. added an error handler to display a message, if the user tries to submit an empty form.

2. this also prevents empty fields in the database

bloofin
Автор

I can delete message, but getting error message.How to fix?
Warning: Cannot modify header information - headers already sent by (output started at in on line 67
If I add exit(), it loads page until I hit F5

CGDarius
Автор

thanks so much
thamks a lot
this guys has helped thousands of developer at google including my two friends at microsoft and google.
thanks sir.

gabrielfono
Автор

Woo! mmtuts you are the man, I went through all 4 tutorials and I found this entire mini series incredibly helpful, on point and relevant. It's beginner friendly too and if advanced users get what's happening they can just guess the steps for themselves. Love people who make such great tutorial content and take their time to guide people along, I feel like I understand PHP more than I did viewing other tutorials.

Just a question about this comment system, is the Login system you are going to implement able to prevent people from deleting or editing comments that aren't theirs? Would love to hear a reply.

MechaGriffin
Автор

Bro thx for the tutorials great videos btw.
You were the most updated guy in mysqli that i find in youtube.
But bro lemme give you a tip...
Why dont you make a tutorial teaching how to make a dynamic site, whit admin page, useres roles.
And in the admin page you can make a place to see whos online on the site and which page he is on.
A complete site...
And this series will be the best one on youtube.

IamJamesA
Автор

8:14 What's a difference ???? Refreshing and completely refreshing ? I wonder if this was why Chrome didn't work for a while.

turboromy
Автор

So helpful, thank you, I'm so grateful

hanhduyenha
Автор

hi after following your steps i got this error

Forbidden
You don't have permission to access this resource.

Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0 Server at localhost Port 80

raoufbakhti
Автор

Great tutorial :) Can you give me a tip on how to show last inserted comment on top of the page?

TheRihins
Автор

<?php
getComments($conn);

?> this code problem in server pls help becuse webpage half hide

ROHITRAJPUT-udxr
Автор

It would be nice to see the edited form in the same page as comment page.

ClassicCartoonsNL
Автор

How can i only delete my posts not all posts

AtomTCP
Автор

This is still an issue:
"Hello sir, when I click the delete buttom, the comment gets deleted from the database but it still stays VISUALLY on the page, untill I refresh the page and then it's gone. Why do I have to refresh the page to make it gone. Also my header function is not working."

Plut-YT
Автор

Good video, but how can I make it so that not every user can delete comments? I want it so that only the owner of the comment can delete it.

marcusevjen
Автор

hi sir can put a confirmation message from delete ... help please sir

rdevilfang
Автор

can you make a video tutorial how to delete a data in the database. in just 1 text box and 1 button? tia!

rgarcia
Автор

Why such when I refresh It .. It loops ... why ??? why it adds same comment to a database ?? please answer me .. thank you

cjrpascual
Автор

Thank you. Helped a lot.
I have an issue though.
When I refresh the browser, it put's the last comment in again. How do I fix this please?

daz
Автор

Warning: Cannot modify header information - headers already sent by (output started at in on line 95

what to do for this kind of warnings ? plzz response ...
the error is showing for header(Location : forum.php ); at delete function

plz response mmtuts .. this is very important .. my project is stack in here for that reason plzzz mmtuts response :\

goglesuciha