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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:49:18+00:00 2026-06-13T02:49:18+00:00

I have a page where administrators can manage user accounts. This is done by

  • 0

I have a page where administrators can manage user accounts. This is done by clicking on an edit link next to the user’s name on the main page (admin/usermanage/) which takes the administrator to the edit page for that user ID (admin/usermanage/?edit=x (where X is the user ID)).

On this page, there is a delete button which takes the user back to the main page that lists all the accounts.

function deleteaccount_confirmation() {
    var answer = confirm("Are you sure you want to delete this account?")
    if (answer){
        window.location = "../usermanage/index.php";
    }
}

This doesnt work though. The user stays on the same page with the URL unchanged (admin/usernamage/?edit=x)

Any possible solutions?

  • 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-13T02:49:19+00:00Added an answer on June 13, 2026 at 2:49 am

    Heres what I’ve done to fix it.

    Rather than using javascript to move around pages, I’ve made a HTML form do it.
    There is also no more GET variables in play anymore. The edit variable has been moved to POST.

    Enough of my rambling, heres the code!

    This part sits anywhere in the page.

    <form method="POST" id="deleteacc">
        <input type='hidden' name='delete_id' value='".$id."' />
    </form>
    

    This is the code for the button. It’s location in the page is respective to where the button is displayed but otherwise didn’t matter if it was in a form or not.

    <button type="button" class="button" name="delete" value="Delete Account" onClick="deleteaccount_confirmation()" />Delete Account</button>
    

    and lastly but not least the Javascript

    function deleteaccount_confirmation() {
        var answer = confirm("Are you sure you want to delete this account?")
        if (answer){
            $("#deleteacc").submit()
        }
    }
    

    What the javascript does is simply triggers the submition of the form using jQuery. The javascript is assigned to any button which is why it doesn’t need to be in the form. The form contains the data as a hidden variable which is triggered by the javascript.

    Hope this helps everyone else!

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

Sidebar

Related Questions

In one of the page I have is where administrators are allowed, however, I
I have MOSS. I want to make a page where a user, say administrator,
I have page where I use model which can have different types (depending by
I have page which is redirected from htaccess. now I can pass the German
I have page, i can contact directly without any problems. http://www.mysite.com/app_dev.php/comments/22 the page shows
I have a Facebook Application in order to manage comments on my web page,
I have coded a page which displays all administrators of the system. What I
I have an administration panel that has a page allowing the administrators to delete
I have set up my reportsmanager page with two accounts to have access using
I'm making a website on which administrators can upload some PDF files. I have

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.