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 8461949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:01:25+00:00 2026-06-10T14:01:25+00:00

I have a form for editing and deleteing phone directory entries for our office.

  • 0

I have a form for editing and deleteing phone directory entries for our office. Each line shows the persons’ name and phone number etc, and has a checkbox.

The form basically has two buttons, edit and delete. You go through and select all the rows that you either want edit or delete, and then the form is submitted.

What I want to do, is have an alert when the delete button is pressed, that asks for confirmation before deleting. What I would like to do, is to list out all the rows that were marked for deletion in this alert window.

I’m not sure if this is possible, as the POST data isnt available until the form is submitted, which in turn would be prevented by the alert window.

Would this be possible using PHP and javascript? I have included some code examples below:

<form name="manage" method="post" action="edit.php">
    <input type="submit" name="add" value="Add">
    <input type="submit" name="edit" value="Edit">
    <input type="submit" name="delete" value="Delete">

//For each row found
while($row = mysql_fetch_assoc($result)) {
    //Echo out a row with details
    echo "<tr>
        <td><input type='checkbox' name='dirid[]' value='".$row['Dir ID']."' /></td>
        <td>".$row['Floor']."</td>
        <td>".$row['First Name']."</td>
        <td>".$row['Last Name']."</td>
        <td>".$row['Extension']."</td>
        <td>".$row['Department']."</td>
        </tr>";
}
</form>

At the moment, all that is posted, is the dirid, which is just a unique ID for each row in the table. The delete script then queries the database, and removes each row for each of those ID’s

I suppose that if it is not possible in an alert window, I could also send the ID’s to the delete script, show them on the page with a confirm button, and then put and alert on top of that as well, but seems a bit long winded.

Any suggestion greatly appreciated.

Eds

  • 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-06-10T14:01:26+00:00Added an answer on June 10, 2026 at 2:01 pm

    may be you can to that with jquery here you have something like that
    http://jsfiddle.net/damian_silvera/Cxqp5/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data entry/editing form with two combo boxes (Name and Group). Each
I have a form for editing a users name and email. So when it
I have a form that handles editing of a domain model (A). This domain
I have a page on my site with a form for editing event information
I have a longish form that scrolls vertically and also allows editing records. When
I have created a form that is used for both adding and editing a
Let's say I have a form for adding/editing products (with field 'user' being a
I have a form for editing a ticket that requires a Reason for Edit.
I have a Rails form for editing objects of a particular class. The labels
I have a jqgrid and use form editing on this grid. The issue I

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.