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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:04:54+00:00 2026-06-12T03:04:54+00:00

Using php I am generating a table from a PostgreSQL system. The user needs

  • 0

Using php I am generating a table from a PostgreSQL system. The user needs to be able to have the option to delete a row in the table, so I have created a “Delete?” button option in the last column of the table.

The button looks like this:

 echo '<td> <input type="submit" name="'.$row['language'].'" value="Delete?" class="odd" />';

So the button gets a name attribute with the language of that row.

I have two issues:
1. Most importantly, I am not sure how to access this field. Initially I was thinking I could get it via POST e.g name = _$POST[‘name’], but I need the ‘language’ field to get the specific button corresponding to the row. Hopefully you understood that…
To clarify, the html attribute name is not generated until the query has been printed out. And then I’d need to know the name attribute to access it in the delete.php.

  1. Even if I can get the name of the language to be deleted from the button, it is possible that there may be other languages of the same name in the database with other attributes, and so I would not want those deleted when I do a delete statement, meaning I need more information from that specific row of the table. So how would I pass more information?

I’ve been considering hidden fields, but I’m unsure how I’d generate all the info and then how it’d be passed to my delete.php file.

If you have any other suggestions too though I’d be open to them.

  • 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-12T03:04:55+00:00Added an answer on June 12, 2026 at 3:04 am

    The most common solution to this is put in a link in the last column, an pasS the id of the row you want to delete in that link.

    A link would look like this:

    <a href="delete.php?id=rowid>delete</a>

    Do not use a sumbit, as you need a different link for every row id.

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

Sidebar

Related Questions

So I have this simple PHP loop that is generating html table data with
I am generating an HTML table with PHP (using the codeigniter framework) and I'm
I'm generating the table in PHP and adding it to HTML using I add
I am generating a simple csv file using php. The file contains some user's
I'm generating an image out of text using php. My code works perfectly on
Trying to use a php generating the email address using the ID eg: peopleID
Using PHP I echo out table rows in a loop like this: <?php /*
Using PHP 5.3.3, PostgreSQL 8.4.11, pgbouncer 1.3.4 (in session mode) on CentOS 6.2 I'm
Using PHP I would like to be able to list root's crontab. I am
Using php I am trying to get some data from a .csv file which

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.