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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:23:08+00:00 2026-06-13T20:23:08+00:00

What I have is a form with details like name, address…and another separate upload

  • 0

What I have is a form with details like name, address…and another separate upload profile pic form. And I want to get that (optional) uploaded picture when the “parent” (separate) form is submitted.
Right now they work like this:
Uploaded pic is sent through .ajaxSubmit() to process_uploaded_image.php. Then it gets processed, resized, and the new picture is made within a “dump/temp” folder. I could return it in success: function(data), in the form of data that could be the echoed $image_path_and_name or as an <img src="$image_path_and_name"/>. I made it this way – that, is having a temp image – since
(1) I want to let the user view what he just uploaded (remember I already have it returned path or img element to jquery and I could place it anywhere I want), and
(2) the uploaded image isn’t final, not until the “parent” form finalizes the registration. And it is still a temp image after all.

So, the problem is: I want to access that uploaded image, and “bring it along” with the “parent” form when it gets submitted…how can I do that exactly? Technically it isn’t a parent form, since I know a form within form is not allowed. But it is tied up and under that parent form logically. I would be thankful for any help, but if possible, I would appreciate it even more if you could consider my present scenario so I won’t have to start from scratch again. Thanks again.

My idea: (please let me know how feasible this is…and/or guideline on how I could do #1)
1. “reconstruct” or copy that file from ajax-jquery returned (data) of $image_path_and_name string or <img src="$image_path_and_name"/>, place it in final upload folder.<—THIS IS WHERE I’M STUMPED! I couldn’t just use move_uploaded_file(), can I?
2. Since, from this point everything’s final..I could save its file path to my database, along with other form info.

3. empty the dump/temp folder.

  • 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-13T20:23:10+00:00Added an answer on June 13, 2026 at 8:23 pm

    My solution is that using a iframe for upload, and using JavaScript like this in the return page of the iframe

    echo("<script type=\"text/javascript\">parent.insert('". $WHAT_YOU_WANT . "');</script>");
    

    and the function insert is defined in the parent page, and can insert the string into the where you want. obj_ta is the target textfield, or something else.

    //A simple input
    function insert(str) {
        obj_ta.value = str;
    }
    
    //A textfield which accept some other user inputs
    function insert(str) {
    var startPos = obj_ta.selectionStart,
        val = obj_ta.value;
    obj_ta.value = val.substring(0, startPos) + str + val.substring(startPos, obj_ta.value.length);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which submit details like name, address, affiliations. Here these inputs
I had another form to upload the details of 1 product which have multiple
I have a ListView control on my form set up like this in details
I have a personal details form that allows you to enter a certain number
I have a form, in that I have user control(for displaying member name with
I have a form for creating an album like following: # app/views/albums/new.html.erb <h2>Details of
I have a confirmation form containing different textFields like Name, Age, Phone no., Email
I have a basic form on my site with fields like name, email etc.
I have a scenario wherein with the following details: I have a form that
I have a form with user details and an update statement that will update

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.