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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:59:42+00:00 2026-05-22T18:59:42+00:00

In my index.php page I have a submit button which takes form data and

  • 0

In my index.php page I have a submit button which takes form data and sends it through POST to an update.php page. On this new page, the database is manipulated then redirects (with PHP) back to the original page. This redirection process works fine in Firefox, but does not seem to work in Chrome/IE.

Relevant code in index.php file:

<form name="battle" action="update.php" method="post">
<input type="radio" name="update" value="<?php print($names[0] . "+" . $names[1]); ?>" />
<input type="radio" name="update" value="<?php print($names[1] . "+" . $names[0]); ?>" />
<input type="submit" name="submit" value="Submit" />
</form>

This is the code at the end of my update.php file:

$con->close();
session_write_close();
header("Status: 200");
header( "Location: index.php" );
exit(0);

This code will work in all browsers if the submit button is NOT disabled onClick, but I really need to have this feature. Does anyone know how to make this redirect work while still having the disable button fetaure?

  • 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-22T18:59:43+00:00Added an answer on May 22, 2026 at 6:59 pm

    Disabling submit buttons on form submits can be a tricky business. This worked for me:

    NB: Requires >= jQuery1.6 to work

    test.php:

    <script type="text/javascript">
    $(document).ready(function ()
    {
        $("form").submit(function ()
        {
            $("input[type='submit']").prop("disabled", true);
        })
    })
    </script>
    
    <form name="battle" action="update.php" method="post">
        <input type="radio" name="update" value="foo" />
        <input type="radio" name="update" value="bar" />
        <input type="submit" name="submit" value="Submit" />
    </form>
    

    update.php:

    header("Status: 200");
    header( "Location: index.php" );
    exit(0);
    
    ?>
    

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

Sidebar

Related Questions

I have form in my html page <form id=login_form method=POST action=index.php> <table> <tr> <td><label
I have a form like this: index.php <form method=post action=send.php> <textarea name=msg id=msg></textarea> <input
i have this question: creating 2 pages in php the first(index.php) contain a form
I have this code to submit a form automatically on page load, but it
I have a function that I use on index.php page and I would like
I have the following scenario. I have a index.php page with the following JQuery
I have a page index.php where i have a link called add_users.php. In add_users.php,
I have an index page index.php , and when the user clicks on a
index.php: <form action=update_db.php method=post> <?php require_once 'modules/' . $currentModule . '.php'; ?> </form> modules/
I have an index.php file which has to process many different file types. How

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.