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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:18:44+00:00 2026-06-04T22:18:44+00:00

what i am trying to do: loading data from mysql database in a table

  • 0

what i am trying to do:
loading data from mysql database in a table with edit buttons.

what is going wrong:
when clicking on edit buttons it doesn’t load the data on the edit form.

what i have tried:
i tried the following code at home on Firefox and it worked perfectly. but at work it fails to load the data in Firefox in the edit form and in IE clicking the button does nothing.

<?php
echo '<table id="viewAll">';
            echo '<tr>';
            echo '<th>Product</th>';
            echo '<th>Status</th>';
            echo '<th>Summary</th>';
            echo '<th>Created</th>';
            echo '<th>Updated</th>';
            echo '<th>Edit</th>';

            echo '</tr>';


            while ($data=mysqli_fetch_array($result)){

            echo '<tr align="center">

            <td>'.$data['product'].'</td>
            <td>'.$data['status'].'</td>
            <td align="left">'.$data['summary'].'</td>
            <td>'.$data['created'].'</td>
            <td >'.$data['updated'].'</td>';

            echo "<td><a href=\"editForm.php?id=$data[id]\" style=\"text-decoration: none\"><input type=\"submit\" value=\"Edit\" /></a></td>";

            echo '</tr>';


                }#end of while


            }#end of if



echo '</table>';
?>

and then i do:

$id=$_GET['id'];



            $query="SELECT * FROM tickets WHERE id='$id'";


            $result = mysqli_query($db,$query) or die( "My query ($query) generated an error: ".mysql_error());

            $data=mysqli_fetch_array($result);





            mysqli_close($db);

I use the contents in the data array to load it into the field in the edit form..

unfortunately this doesn’t work in IE. clicking edit button doesn’t do anything. Can somebody please tell me how to fix it? Thanks.

  • 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-04T22:18:45+00:00Added an answer on June 4, 2026 at 10:18 pm

    Try using this:

    echo "<td><form action=\"editForm.php\" method=\"get\"><input type=\"hidden\" name=\"id\" value=\"$data['id']\" style=\"text-decoration: none\" /><input type=\"submit\" value=\"Edit\" /></form></td>";
    

    That will mean you can still use a button.

    Also, I strongly suggest if you are not using tables for tabular data, find an alternative, such as <div>s.

    And remember to sanitise your SQL queries, or you may be susceptible to SQL injection attacks.
    (e.g. $id=$_GET['id']; => $id=mysqli_real_escape_string($conn, $_GET['id']); where $conn is your MySQL connection object).

    You can search for any of these things on Google.

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

Sidebar

Related Questions

I'm trying to load data from a CSV file into a MySQL database, and
I am trying to load data from one table to another. But I only
I m trying loading data table from xml schema. I can see column names
I'm trying to load data into a MySQL database using the LOAD DATA LOCAL
I am trying to display data from a mysql database on my server. I
Im loading an image from a SQL CE db and then trying to load
I am trying to fetch data from DB and loading the DB with the
I'm trying to load data from an external .js file, containing a JSON representation
I am trying to load data from XML string into a structure of some
I'm trying to load data from the jsp response which is a JSON using

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.