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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:49:51+00:00 2026-06-07T04:49:51+00:00

I am currently working on a multiple image uploader with file directory. I am

  • 0

I am currently working on a multiple image uploader with file directory. I am wanting to store file name inside my MySQL.

How can I store these variables(image names) inside my table through php ?

How can I retrieve the variables through php?

URL Generate by uploader:

  • http://www.website.com/imageupload/index.php?i=4ff4bfd02c241.jpg
  • http://www.website.com/imageupload/index.php?i=4ff4bfd02c242.jpg

Filename:

  • 4ff4bfd02c241.jpg
  • 4ff4bfd02c242.jpg

Table Name: urlimage

id: autoincrement
image_name

I am able to echo out the path and the name through this:

$images = explode(',', $_GET['i']);

$path = Configuration::getUploadUrlPath('medium', 'target');

foreach ($images as $image) {

    echo '<div><p>' . $path . $image . '</p><img src="' . $path . $image . '" /></div>';
}

?>
  • 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-07T04:49:52+00:00Added an answer on June 7, 2026 at 4:49 am
    $images = explode(',', $_GET['i']);
    
    $path = Configuration::getUploadUrlPath('medium', 'target');
    
    
    if(is_array($images)){
    
      $sql = "INSERT INTO `urlimage` (`image_name`) VALUES ";
    
      foreach ($images as $image) {
    
        //echo '<div><p>' . $path . $image . '</p><img src="' . $path . $image . '" /></div>';
        $value[] = "(".$path.$image.")"; // collect imagenames
      }
    
      $sql .= implode(',', $value).";"; //build query
    
      //don't know how you send queries, you should use a kind of mysqli-functionality
      queryfunction($sql);   
    }
    

    Addiontally: you should think of using $_POST rather than $_GET becaus there’s a length limit depending on the browser (some of them cut URLs after 255 chars).
    Also never put in userdefined content directly into you DB. You’ll need some kind of escaping ( http://php.net/manual/en/function.mysql-real-escape-string.php ).

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

Sidebar

Related Questions

I am currently working with multiple php image uploading but using this SITE I
I'm currently working on multiple changes/bugs and I would like to be able to
I am currently working on a project where I need to generate multiple values
So, I'm working on translating my C++ app into multiple languages. What I'm currently
I'm currently working on a program where there are multiple icons dynamically added to
I am currently working on a system that involves storing multiple studies and details
I have a project I am currently working on that has multiple validators and
I'm currently working on Image stitching using OpenCV 2.3.1 on Visual Studio 2010, but
I'm wondering if it's possible to combine multiple DLL's into 1. I'm currently working
Currently working with converting SQLException error messages into messages that are more useful for

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.