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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:08:49+00:00 2026-06-09T21:08:49+00:00

I have a webpage that generates a table from mysql. I have a button

  • 0

I have a webpage that generates a table from mysql. I have a button at the beginning of each row. I would like it so if the user decides to press on the button, the contents of that individual row are written to a new table in MySQL.

Currently I am thinking of just having the button be an href to another php script that connects to mysql and inserts the row into a table; however, I think that will redirect my current page.

I would like the button to run the script, without redirecting my current page. That way, the user can continue analyzing the table without having the page have to reload every time.

This is what my current table looks like. This is just a snippet, and the table can be very large (hundreds of rows)
enter image description here

  • 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-09T21:08:51+00:00Added an answer on June 9, 2026 at 9:08 pm

    In order to do this client side, there are a couple of ways I can think of off hand to do this:

    Javascript

    You can include a Javascript library (like the ever popular JQuery library), or code it yourself, but you could implement this as an XMLHTTPRequest, issued from a click handler on the button. Using a library is going to be the easiest way.

    An iframe

    Create a hidden iframe:

    <iframe style="display:none;" name="target"></iframe>
    

    Then just set the target of your tag to be the iframe:

    <a href="your_script.php" target="target">...</a>
    

    Whenever someone clicks on the link, the page will be loaded in the hidden iframe. The user won’t see a thing change, but your PHP script will be processed.

    Of the two options, I’d recommend the Javascript library unless you can’t do that for some reason.

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

Sidebar

Related Questions

I have a part of webpage that is dynamically generated using MySQL queries: <table
I have a webpage in which I have a div that I would like
I have a webpage that when landed on, will detect a user's physical location
I have a webpage that redirects to another webpage like this: http://www.myOtherServer.com/Sponsor.php?RedirectPage=http://mylink.com/whereIwasgoingtogo.html Then the
I have a webpage on my site that displays a table, reloads the XML
I have some javascript that displays some data from my database on my webpage.
just wondering if I have a webpage that generates a pdf, but could take
I have a PHP webpage, that generates statistics and takes about 15sec to generate
I have a rails app that generates a webpage with some reports (Google charts
I have an edit button at the end of a table of mysql records

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.