Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7680045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:01:07+00:00 2026-05-31T18:01:07+00:00

Here is the extract code of how to make a confim box when delete,

  • 0

Here is the extract code of how to make a confim box when delete,

For HTML part
A link is to trigger JS code , but it will trigger the php code at same time

For JS part
popupbox is triggered

For PHP part
Process the sql query, it should be ok

The problems are…

  1. I should use js to trigger the php page? But how can i let the php page know that which ListID i want to delete?
  2. What should i put in the html link?
  3. What if i want to include the list name in the popup box e.g. do you want to delete list A ,where list A is a variable already. The only thing is how can i append it to the popup box

Thank you

HTML

<a id="delete" href='delete.php?id=$set[ListID]'>Delete</a>

JS

$(function(){
    $("#delete").click(function() {
        // what should be add here? 
    });
});

PHP

//connection db
INSERT  INTO delete_list SELECT * FROM list WHERE ListID=?;    
INSERT  INTO delete_user_list SELECT * FROM user_list WHERE ListID=?;    
INSERT  INTO delete_require_attributes SELECT * FROM require_attributes WHERE ListID='2';    
INSERT  INTO delete_subscriber SELECT * FROM subscriber WHERE ListID=?;    
INSERT  INTO delete_subscriber SELECT * FROM subscriber WHERE ListID=?;    
DELETE FROM list WHERE ListID = '1'

Sorry, I mess up the previous question as i found that the plugin i used in last question does not work for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:01:08+00:00Added an answer on May 31, 2026 at 6:01 pm

    i had done this by giving the id to the HTML element itself with data (HTML5 ref) sweet to use with jQuery.
    After this you can do an ajax call optional to delete server-side in the database.

    Example

    <a data-id="<?php echo $set[ListID]; ?>" class="delete-trigger" href='javascript:;'>Delete</a>
    

    JS

    $(function(){
        $("#delete-trigger").click(function() {
            var id = $(this).data('id');
            $.ajax({
                url: 'http://yoururl.com/delete.php?id=' + id,
                success: function(data) {
                    console.log('deleted');
                }
            });
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the extract code of how to make a confim box when delete,
Have a simple form (only extract fields here) but for some reason the JQserilization
Here's the current code I am using. <? header(Content-type: image/png); // example: <img src=gradient.php?height=600&width=100&start=00FF00&end=ff0000
I'm using the following code on my iPhone app, taken from here to extract
Here is an extract from item 56 of the book C++ Gotchas: It's not
i want to extract some text in certain website. here is web address what
I'm trying to make a regex which gets the part between two other things
I don't really understand PHP and now I need to make our contact us
I modified the code published on smbrown.wordpress.com which can extract the top tracks using
Here is nice piece of code that works fair in all browsers: http://www.imaputz.com/cssStuff/bigFourVersion.html Since

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.