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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:12:02+00:00 2026-06-18T10:12:02+00:00

I have been creating a website to allow users to rate an image uploaded

  • 0

I have been creating a website to allow users to rate an image uploaded by another user. I have my code working great. The user is presented with the image, a button to flag the image, 10 radio buttons to choose their rating and a submit button (all within the same form).

My problem is that I would like to remove the submit button and process the form when the user clicks the radio button. The problem with this is that the flag button (image button) is also submitting the form. My code is below:

HTML

<form name="ratebox" action="Box.php?bid=<?php echo $boxId ?>" method="post">
    <table style="margin: 0 auto;">
        <tr>
            <td colspan="2"><img src="img/boxes/<?php echo $boxId ?>.png" title="<?php echo $boxName ?>" height="350" width="350"></td>
        </tr>
    <tr>
    <input
        type="image"
        name="flag_submit"
        src="img/Flag.png"
        onmouseover="this.src='img/Flag_Click.png'"
        onmouseout="this.src='img/Flag.png'"
        height="30"
        width="30"
        />
        </td>
    </tr>
    <tr>
        <td colspan="2" style="text-align:center;">
            1<input type="radio" name="rdoRate" value="1" >
            2<input type="radio" name="rdoRate" value="2" >
            3<input type="radio" name="rdoRate" value="3" >
            4<input type="radio" name="rdoRate" value="4" >
            5<input type="radio" name="rdoRate" value="5" >
            6<input type="radio" name="rdoRate" value="6" >
            7<input type="radio" name="rdoRate" value="7" >
            8<input type="radio" name="rdoRate" value="8" >
            9<input type="radio" name="rdoRate" value="9" >
            10<input type="radio" name="rdoRate" value="10" > 
        </td>
    </tr>
    <tr><td colspan='4' align='center'><input type='submit' name='rate_submit' value='Rate'></td></tr>
</table>
</form>

PHP

if (isset($_POST['flag_submit_x']))
{
        //Code to process the flagged image
}

if (!empty($_POST['rate_submit']))
{
        //Code to process the rated image
}

Is there any way I can submit the form when a radio button is pressed and retrieve the value of the radio button that has been pressed?

  • 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-18T10:12:04+00:00Added an answer on June 18, 2026 at 10:12 am

    Yes, you need to use Javascript for that. Using jQuery,

    $('input[type=submit]').click(function(){
         return false;
    });
    
    $('input[type=radio]').click(function(){
        $('form').submit();
    });
    

    You need to learn how to use $.ajax() to transfer info to and from PHP. Read this.

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

Sidebar

Related Questions

I have been creating a website where my users can rate images that have
I have a website which I have been working on creating very rapidly, and
I have been creating an image gallery with jQuery, all is done. The images
So i have been creating this framework thing that basically puts together source code
I have been reading that creating dependencies by using static classes/singletons in code, is
I have been thinking of creating a website with asp.net. Is it possible to
I'm creating a simple mobile website to render specifically on iPhone. I have been
I have been working on Wordpress for a month creating themes. Otherwise, when I'm
I have been creting a php website that allows users to add comments to
I have been creating my first database for a website and I have created

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.