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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:09:20+00:00 2026-06-18T10:09:20+00:00

I have a php file where it has a table with check box with

  • 0

I have a php file where it has a table with check box with the value which is equal to the ID from MYSQL table. When I run it I get the error.
I know there is some problem with ” and ‘ can any one help in solving this?

    while ($row = mysqli_fetch_array($result))
    {
    echo "<tr>";
    ***//I get error in the following line*** 
    echo"<td> <form action="del_prod.php" method="post">input type="checkbox" name="product_id" value="$row["product_id"]"></td>"
    echo "<td>" . $row['product_id'] . "</td>";
    echo "<td >" . $row['product_name'] . "</td>";
    echo "<td>" . $row['weight'] . "</td>";
    echo "</tr>";
    }
    echo "</table>";
    ?>
  • 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-18T10:09:21+00:00Added an answer on June 18, 2026 at 10:09 am

    You have several problems with your line.

    echo "<td><form action=\"del_prod.php\" method=\"post\"><input type=\"checkbox\" name=\"product_id\" value=\"".$row['product_id']."\" /></td>";
    
    • You’re not escaping the double quotes.
    • You are missing the opening < on the input tag.
    • You’re not closing the input tag.
    • You’re not concatenating the $row[‘product_id’] in the string properly.
    • You’re missing a semi-colon.

    This is all aside from the fact that the form tag shouldn’t really be in the <td>. It should be outside of the table, or better yet without a table at all! 🙂

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

Sidebar

Related Questions

I have a php file with a DIV which has mysql table content. I
I have a test php file which has 50 buttons in a table (just
I have a php file that receives data from mySQL table. The mySQL table
I have a php file which has some variables like $name1, $name2... How can
I have a php file which has a require_once Statement (?) this file is
I have an index.php file which has 2 included files require(stats.php); require(stats_encry.php); stats.php which
Iam making an app which has one index.php file. I also have these other
I'm having trouble with PHP text parsing I have a txt file which has
I have 2 files namely: uploading.php emaillinks.php both include a file inc.php which has
I have a php file which has one form and 2 submit buttons, onclick

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.