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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:50:27+00:00 2026-06-13T01:50:27+00:00

EDIT : I might just make it a more ‘ step-by-step ‘ process i.e.

  • 0

EDIT : I might just make it a more ‘step-by-step‘ process i.e.

Seeing as it feels more user-friendly & it’s only for <5 images. I have read & appreciate all of the help that I have received so far.


I’m fairly new to PHP & I’m building a basic PHP image editor which may allow multiple image data auditing which is then inserted into a MySQL database. A limit of 5 images may be uploaded at a time for this system (implying that there will only be a low amount of records to play with), but I’ll get to that further down.

GUI:

Some of the data columns used:

  • image id
  • caption
  • description
  • published
  • imageposition
  • delete button

All images are echo’d in a while loop by a previous ‘SELECT *’ result set. Each image will have the ‘image id’ echo’d inside each input name, so output will be for example:

caption-2, description-2, published-2, imageposition-2, caption-3, description-3

Also, the data values from the previous resultset are echo’d into the input value, allowing the client to edit the current data that exists in the database. There is only one submit button.

My question:

I want to be able to post all of the modified image(s) data to a processor.php form which will then allow me to insert it as an INSERT sql string into the MySQL images table. I need the PHP to be dynamic incase:

  • images are deleted (image id)
  • new images are uploaded (image id)

If there is an easier way of doing any of the above, I am welcome to new ideas/opinions. Sorry in advance for my poor understanding of PHP.

  • 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-13T01:50:28+00:00Added an answer on June 13, 2026 at 1:50 am

    To delete the records easily :

    <form action="processor.php" method="post">
    <?php
    foreach ($images as $img) { // assuming $images is the result set of your sql query
    ?>
      <input type="text" name="name<?php $img['image_id'];?>" value="<?php $img['caption'];?>">
      <input type="text" name="desc<?php $img['image_id'];?>" value="<?php $img['description'];?>">
    ...
    <a href="http://yoursiteurl/deleteimg.php?id=<?php $img['image_id']?>">
    <?php } ?>
    </form>
    

    In deleteimg.php :

    <?php
    $del = $_POST[id];
    $query = $msqli->prepare("DELETE FROM imagetablename WHERE image_id=?");
    $query->bind_param( 's',  $del );
    $query->;execute();
    ?>
    

    Updating and adding new rows may involve javascript, and much more harder.

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

Sidebar

Related Questions

EDIT To make this post a bit more constructive, and let it possibly help
EDIT: When should and shouldn't you break away from OOP for speed/performance? might be
EDIT : It turned out that this can only be done through an external
Ok, I've asked a few related questions here and only ended up with more
I need to make an application for creating logic circuits and seeing the results.
I realize that this question might not make sense to some, but I was
EDIT: What is the best way to structure complex applications with CodeIgniter? To make
You make a gaming website where the user can buy gaming credits and the
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
EDIT: I was an idiot. I simply had an image that was vertically long,

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.