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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:09:15+00:00 2026-06-11T15:09:15+00:00

I wonder whether someone may be able to hep me please. I’ve put together

  • 0

I wonder whether someone may be able to hep me please.

I’ve put together this page which allows the user to view the records saved in their account.

What I’m now trying to do is add the functionality whereby the user can select a radio button, click on the ‘Location Details’ icon, and they are taken to the ‘Details Page’ pertinent to the record which they have selected the radio button against.

The problem I’m having is that no matter which radio button I select, when I click on the icon, I’m always taken to the ‘Details Page’ for the last record. (*NB* For the purpose of this post I’ve taken the ‘submit’ action away from the button.)

The code below creates the table and ‘Location Details’ icon

 <table id="theTable" width="835" class="sortable-onload-zebra no-arrow rowstyle-alt colstyle-alt paginate-20 max-pages-20 paginationcallback-callbackTest-calculateTotalRating paginationcallback-callbackTest-displayTextInfo sortcompletecallback-callbackTest-calculateTotalRating">
              <thead>
                <tr>
                  <th width="60" bgcolor="#ff8401">Select</th>
                  <th width="150" class="sortable-text" bgcolor="#ff8401">Location</th>
                  <th width="300" class="sortable-text" bgcolor="#ff8401">Address</th>
                  <th width="30" class="sortable-text" bgcolor="#ff8401">Finds</th>
                </tr>
              </thead>
              <tbody>
                <?php
                    mysql_data_seek($result, 0);
                    while ($row = mysql_fetch_array($result)) {
                        /* display row for each user */

                ?>
                <tr height="80px">
                  <td style="text-align: center"><input type="radio" id="lid" name="lid" value=<?php echo $row['locationid'];?> /></td>
                  <td style="text-align: left"><strong><?php echo $row['locationname'];?></strong></td>
                  <td style="text-align: center"><?php echo $row['returnedaddress'];?></td>
                  <td style="text-align: center"><strong><em><?php echo $row['totalfinds'];?></em></strong></td>

            </tr>

                <?php
                        }
                    } else {
                        echo "<tr>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>                                     
                            </tr>
                            <tr>
                                 <td colspan='5'><div align='center'><strong>No locations have been added yet. <a href='addlocation.php'>Click here</a> to add one.</strong></div></td>
                            </tr>
                            <tr>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                                 <td>&nbsp;</td>
                            </tr>";

}

?>  
              <form action='locationsaction.php'>
              <input type='submit' class='detailsButton' name='type' value='Details' alt='Location Details' title='Location Details' style='margin-right:10px' />
              </form>   
            </tbody>
            </table>

Because I intend to have several submit buttons within one form, I’ve created the following ‘locationsaction.php’ script which you will see is called in the above script.

<?php
session_start();
$_SESSION['lid'] = $_POST['lid'];
if (isset($_POST['type'])) {
    $urls = array(
        'Details' => 'locationdetails.php',
        'Add Finds' => 'addfinds.php',
        'Images' => 'addimages.php',
        'View Finds' => 'locationfinds.php'
    );
    $url  = $urls[$_POST['type']];
    header("Location: " . $url);
}
?>

I’ve been working on this for several days now and have tried several tutorials, but I just can’t seem to get this to work.

I just wondered whether someone may be able to take a look at this please and offer some guidance on how I can pass the correct radio button value through the ‘submit action.

Many thanks and kind regards

  • 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-11T15:09:16+00:00Added an answer on June 11, 2026 at 3:09 pm

    This is your current form:

    <form action='locationsaction.php'>
    <input type='submit' class='detailsButton' name='type' value='Details' alt='Location Details' title='Location Details' style='margin-right:10px' />
    </form> 
    

    Your table is not in your form at all; when you click on the submit button, it will only send details of inputs that are between the <form> tags.

    If you move the <form action tag right to the top of the page, it should work.

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

Sidebar

Related Questions

I wonder whether someone can help me please. I've put together this page, which
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able yo help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together
I wonder whether someone may be able to help me please. I've put together

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.