
How to Delete Data From Mysql Database
In this tutorial, we will explain how to Delete Data from Mysql database which is already inserted in the database using PHP.
table.php
<?php include(db.php); ?> <html> <head> <title>Table</title> </head> <body> <div class="table"> <div class="tab1"><h1>Name</h1></div> <div class="tab1"><h1>Father name</h1></div> <div class="tab1"><h1>Mother name</h1></div> <div class="tab1"><h1>E-mail</h1></div> <div class="tab1"><h1>Address</h1></div> <div class="tab1"><h1>DOB</h1></div> <div class="tab1"><h1>Category</h1></div> <div class="tab1"><h1>Image</h1></div> <div class="tab1"><h1>Action</h1></div> <div class="tab1"><h1>Delete</h1></div> <?php $query1 = "select * from new order by id desc limit 0,30"; $query2 = mysql_query($query1); while($row = mysql_fetch_array($query2)) { ?> <div class="tab1"><h1><?php echo $row['name'];?></h1></div> <div class="tab1"><h1><?php echo $row['father_name'];?></h1></div> <!--from database--> <div class="tab1"><h1><?php echo $row['mother_name'];?></h1></div> <div class="tab1"><h1><?php echo $row['e_mail'];?></h1></div> <div class="tab1"><h1><?php echo $row['address'];?></h1></div> <div class="tab1"><h1><?php echo $row['dob'];?></h1></div> <div class="tab1"><h1><?php echo $row['category'];?></h1></div> <div class="tab1"><h1><a href="delete.php?id=<?php //echo $row['id'];?>">Delete</a></h1></div> <?php } ?> </div> </body> </html>
style.css
.table{ height:400px; width:100%; float:left; } .tab1{ width:9.5%; height:42px; border:1px #000000 solid; float:left; } .tab1 h1{ width:70px; height:20px; font-size:18px; float:left; margin:0px; padding:0px 30px; } .tab1 h2{ width:89.5px; height:20px; font-size:18px; float:left; margin:0px; padding:0px 15px; }
delete.php
<?php include(db.php); $id = $_GET['id']; $querydel = "delete from new where id = '$id' "; mysql_query($querydel); ?>
db.php
<?php mysql_connect('localhost', 'root', ''); mysql_select_db('db'); ?>
whoah this blog is fantastic i really like reading your articles.
Keep up the great work! You know, a lot of individuals are searching round for
this info, you could help them greatly.
Hi, I do believe this is a great web site. I stumbled upon it 😉
I may revisit once again since I have bookmarked it.
Hey I am so excited I found your weblog, I really found
you by error, while I was browsing on Bing for something else, Anyways I am here now and
would just like to say thanks a lot for an incredible post and an all
round exciting blog (I also love the theme/design), I don’t have time to go through
it all at the moment but I have bookmarked
it and also added in your RSS feeds, so when I have time
I will be back to read a lot more, Please do keep up the fantastic job.
I believe that is among the such a lot significant information for me.
And I am happy to read your article. However, want to
remark on few basic things, The web site taste is great, the articles are truly great : D.
Just right job, cheers
Hello, the whole thing is going well here and ofcourse every one is sharing facts, that’s
really excellent, keep up writing.
Thank you, I have recently been searching for info approximately this subject for a long
time and yours is the greatest I have found out till now.
However, what in regards to the bottom line? Are you certain about the supply?
I was recommended this web site by means of
my cousin. I am not positive whether or not this post is written through him as nobody
else recognise such exact about my trouble. You are amazing!
Thanks!
Hello. excellent job. I did not imagine this.
This is a remarkable story. Thanks!
I need to to thank you for this wonderful read!! I certainly enjoyed
every little bit of it. I’ve got you bookmarked to check out
new stuff you post…
Thanks for the marvelous posting! I actually enjoyed reading it, you happen to be a great author.I will make certain to
bookmark your blog and definitely will come back at some point.
I want to encourage that you continue your great writing, have a nice morning!
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you! However, how could we communicate?
Hey there! This is kind of off topic but I need some advice from an established blog.
Is it hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast.
I’m thinking about setting up my own but I’m not sure where to begin. Do you have any ideas or suggestions?
Many thanks https://keystarindustries.com/3-composite-deck-keystar-industries/
Just wish to say your article is as surprising. The clarity in your post is just spectacular and i can assume you
are an expert on this subject. Well with your permission let me to grab your RSS feed to keep up to date with forthcoming post.
Thanks a million and please carry on the rewarding work.
Wow, this piece of writing is nice, my younger sister is analyzing these things, thus I am going to convey her.
Hello, i feel that i saw you visited my blog so i got
here to go back the choose?.I am trying to find things to improve my site!I suppose its ok to make use of a few
of your ideas!! https://mycustomgolfball.com/157-golf-balls
Keep on working, great job!
Very soon this site will be famous amid all blogging
viewers, due to it’s fastidious content
Do you mind if I quote a few of your articles
as long as I provide credit and sources back to your blog?
My blog is in the very same niche as yours and my users would definitely benefit from a lot of the
information you present here. Please let me know if this ok with you.
Many thanks!
Please let me know if you’re looking for a article writer for your
blog. You have some really good articles and I feel I would be a good asset.
If you ever want to take some of the load off, I’d love to write some content for your blog in exchange for a
link back to mine. Please shoot me an e-mail if interested.
Cheers!
Amazing! Its actually remarkable article, I have got much clear idea on the topic of from this article.
I absolutely love your blog and find many of your post’s to be just what
I’m looking for. Would you offer guest writers to write content for you?
I wouldn’t mind composing a post or elaborating on a number of
the subjects you write with regards to here. Again, awesome web site!
I love it when individuals come together and share ideas.
Great blog, continue the good work!
I got this site from my friend who shared with me about this site
and now this time I am browsing this web page and reading very informative articles at this place.
Wonderful, what a web site it is! This web site presents valuable data to us, keep it up.
Hello would you mind letting me know which hosting company you’re using?
I’ve loaded your blog in 3 completely different internet browsers and
I must say this blog loads a lot faster then most. Can you recommend
a good internet hosting provider at a honest price?
Cheers, I appreciate it!
whoah this blog is wonderful i like studying your posts.
Stay up the great work! You know, lots of people are
looking round for this info, you could help them
greatly.
Les stratégies de transformation digitale.
Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I get in fact enjoyed account your blog posts.
Any way I will be subscribing to your augment and even I achievement you access consistently rapidly.
Thanks for the marvelous posting! I actually enjoyed reading it, you happen to be a great
author.I will be sure to bookmark your blog and will often come back down the road.
I want to encourage continue your great posts, have a
nice morning!
Yes! Finally someone writes about youtube vidos rosa
lopes de operacion triumfo unchained melody.
If You want to contact us Click here
Appreciating the commitment you put into your blog and in depth
information you provide. It’s nice to come across a blog every once in a while that isn’t
the same unwanted rehashed material. Excellent read!
I’ve bookmarked your site and I’m including your RSS feeds to
my Google account.
Thank you for the good writeup. It in reality used to be a leisure account it.
Glance complex to far delivered agreeable from you!
However, how can we keep in touch?
Greetings from Carolina! I’m bored to tears at work so I decided to
browse your site on my iphone during lunch break. I love the info you present here and can’t
wait to take a look when I get home. I’m surprised at how quick your blog loaded on my
phone .. I’m not even using WIFI, just 3G ..
Anyhow, fantastic blog!
This paragraph offers clear idea for the new viewers of blogging, that really how to do blogging.
you can Contact Us by this link
It’s amazing designed for me to have a site,
which is useful in favor of my experience. thanks admin
This article will help the internet viewers for creating
new blog or even a blog from start to end.