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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:21:22+00:00 2026-06-06T13:21:22+00:00

First, thank you for reading this. I am just starting php and I am

  • 0

First, thank you for reading this.

I am just starting php and I am tying to make a site using FileMaker to display and enter information.

I have the php connecting to my database, then a search page using a form, then it displays a list of records. I would like to make a “button” that will select one record then display related records.

This is where my trouble is. I do not know how to make a form that will save either the record_Id or key field to then display the next page.

I am using a foreach loop to display the list in a table:

$records = $result->getRecords();
echo '<table border="1">';
echo '<tr>';
echo '<th>Company</th>';
echo '<th>Id Num</th>';
echo '<th>Choose</th>';
echo '</tr>';
foreach ($records as $record) {
    echo '<tr>';
    echo '<td>'.$record->getField('Company').'</td>';
    echo '<td>'.$record->getField('K_Medical').'</td>';
    echo '<td>
    <form action="welcome.php" method="post">
#This is where I think I need the button, but instead it just breaks :( 
      <input type="hidden" name="med_id[]" value='$record->getField('K_Medical')/>';
    <input type="submit" />
    </form>';
    echo '</form></td>';
    echo '</tr>';
}
echo '</table>';

As you can see I have tried to use a hidden form field to get the key field of the record, but the page dose not work. I get an error 500 when I try to view it in a browser.

Any help would be greatly appreciated! If I have not provided enough information please let me know.

  • 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-06T13:21:23+00:00Added an answer on June 6, 2026 at 1:21 pm

    Replace :

    echo '<td>
    <form action="welcome.php" method="post">
    #This is where I think I need the button, but instead it just breaks :( 
      <input type="hidden" name="med_id[]" value='$record->getField('K_Medical')/>';
    <input type="submit" />
    </form>';
    

    By :

    echo '<td>
    <form action="welcome.php" method="post">
    #This is where I think I need the button, but instead it just breaks :( 
      <input type="hidden" name="med_id[]" value='.$record->getField('K_Medical').'/>
    <input type="submit" />
    </form>';
    

    You have a quotes and concatenation errors.

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

Sidebar

Related Questions

First and foremost, thank you all for reading this and helping, I'm very grateful.
First, I would to thank everyone for all the help they provide via this
First, a thank you in advance. Second, this is my first post so apologies
I'm just starting out with unit testing in C#. I have been reading about
This is my first post here. I have been reading posts here since I
It's my first post on here, and I'd just like to thank everyone so
I'm just starting out (reading up a lot for the past couple of days).
let me first thank you for taking the time to read this. I'm trying
Firs of all thanks for reading this. I'm having trouble updating the progress from
First of all thank you for your time and sorry if some issues are

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.