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

The Archive Base Latest Questions

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

I am having multiple fields of file upload. In the start there is no

  • 0

I am having multiple fields of file upload. In the start there is no field when a user clicks on add button it displays a file upload field

In View

PHP    
<?php echo $i = 0;?>

Javascript
var i = '<?php echo $i?>';  

<input type="file" name="product_image_' + i +'"/>

When i submit the form if displays this output

Array
(
    [product_image_1_] => Array
        (
            [name] => 25412_D80_backsanspic.png
            [type] => image/png
            [tmp_name] => C:\xampp\tmp\php68.tmp
            [error] => 0
            [size] => 355623
        )

    [product_image_2_] => Array
        (
            [name] => 25420_D40_right.png
            [type] => image/png
            [tmp_name] => C:\xampp\tmp\php69.tmp
            [error] => 0
            [size] => 347694
        )

    [product_image_3_] => Array
        (
            [name] => 26135_P6000_34r.png
            [type] => image/png
            [tmp_name] => C:\xampp\tmp\php6A.tmp
            [error] => 0
            [size] => 420441
        )

    [product_image_4_] => Array
        (
            [name] => 
            [type] => 
            [tmp_name] => 
            [error] => 4
            [size] => 0
        )

)

You can see there is underscore in each file upload field. I dont understand how this is possible. Also if i do this

echo $_FILES['product_image_4_']['error'];

It displays output but this does not

echo $_FILES['product_image_4']['error'];

Instead it produces error undefined index product_image_4
Any suggestion. I am using pyrocms built on codeigniter.

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

    I have found an alternate solution for this problem i am removing _ with php for the time being not a perfect solution but it lets me go on with my work.

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

Sidebar

Related Questions

I'm having some problem with validations for multiple fields, specifically with case-sensitive unique validations
I need to add and delete class on an element having multiple classes: This
I'm having trouble separating files that a user might post to separate input type=file
The issue I'm currently having is mapping multiple GUI fields to object properties (i.e.
I have a form that has multiple fields, and for testing purposes is there
I'm having a problem using a CSV file uploaded via a PHP form. Here
I'm having some trouble sorting data from a text file by a certain field.
I got a PNG having multiple images encoded in it. How do I make
I'm having multiple images (all which are clickable and have a value associated with
I have a NSString object having multiple conditions specified in it like below: NSString

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.