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

  • Home
  • SEARCH
  • 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 5988545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:58:23+00:00 2026-05-22T22:58:23+00:00

I have a Submit button to remove a user: <form class=spform action=<?=$_SERVER[‘PHP_SELF’]?> method=post name=userdetails

  • 0

I have a Submit button to remove a user:

 <form class="spform" action="<?=$_SERVER['PHP_SELF']?>" method="post" name="userdetails" onsubmit=""> 
   <input type="submit"' name="remove_user[<?=$i?>]" id="formButton" value="Remove" /> 
</form> 

My Script removes the user as follows:

if (isset($_POST['remove_user']))
{
    for ($j = 1; $j <= $_SESSION['highest_user_index']; $j++)
    {
        if (array_key_exists($j, $_POST['remove_user']))
        {
            // remove user details from session variables
            unset($_SESSION["delegate".$j]);
            $_SESSION['number_of_usesr'] = $_SESSION['number_of_users'] - 1;
        }
    }
}

Now i want to change the Submit Button to a link. How do I do this?

  • 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-22T22:58:24+00:00Added an answer on May 22, 2026 at 10:58 pm

    You can use javascript:

    <form class="spform" action="<?=$_SERVER['PHP_SELF']?>" method="post" name="userdetails" onsubmit=""> 
       <a href="javascript: submitform()">Delete user</a>
       <input type="hidden" name="remove_user[<?=$i?>]" value="Remove" /> 
    </form>
    
    <script type="text/javascript">
    function submitform()
    {
      document.userdetails.submit();
    }
    </script>
    

    or a link with GET parameters:

    <a href="<?php echo $_SERVER['PHP_SELF']."?remove_user=1&userid=".$i ?>">Delete user</a>
    

    in your server side code you have to read out the get parameters

     if (isset($_GET['remove_user']))
     {
         userid = $_GET['userid'];
    
     }
    

    Sorry if there are any errors in the code I didn’t try it

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

Sidebar

Related Questions

I have a submit button that changes when the user hovers his mouse over
I have a image button thats acts as a form submit button: <a href=#
I have a form with a submit button. I have called a function on
I have a form with a css submit button. When a the submit button
I have a simple form (textbox, submit button) which is wrapped in an update
i have a form with 2 fields username: password: and a submit button. the
Hi have a jQuery Validation on the form, When user hits submit it generates
I have a web form to submit a new user details. In that for
I have a submit button that is a block of HTML code because of
I have a search box that doesn't have a submit button, I need to

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.