Results 1 to 5 of 5

Thread: how to upload file, then return to form?

  1. #1

    how to upload file, then return to form?

    Here is the problem, I'm not very good with PHP.

    I have a php page with Form 1 and Form 2 on it.

    Form 1 - has all the user information and submit button
    Form 2 - has a file upload feature and submit button

    user uploads file by submitting form 2, it works by sending to another php file.

    what I need is them to return and then be able to submit form 1 with all their information, including the name of the file, but the file exists in form 2 and I can't submit two forms with one button???

    am I being stupid, or do I need to have another approach at this?

    any suggestions would be great.
    *************************************
    Josh Jones
    www.levelfourdevelopment.com
    *************************************

  2. #2
    why don't you just put everything in 1 form? and i have no idea why you would have the user type in the file name when you should just get that from the uploaded file.

  3. #3
    well, it's a long story really, but the file goes to a special upload.php location that restructures the file and renames the file for a secure system that I am developing, basically wrapping the file into PHP...

    long story short, if I could put it into one, I would, but I can't...
    *************************************
    Josh Jones
    www.levelfourdevelopment.com
    *************************************

  4. #4
    i still see on reason why you can't do that all in one form.

    anyway, then just redirect the user to a 2nd form page. or use AJAX to keep them on the same page while submitting 2 forms.

  5. #5
    I see, I was thinking, can I use some small javascript to copy the variable from that file field to a form field in my form 1? this way, when they hit upload on Form 2, it also populates the form field in Form 1, so when they return, they can just submit Form 1 and it will be perhaps in a hidden field.

    I know the method doesn't make sense, so please work with me on it!!!! you know how some projects are...
    *************************************
    Josh Jones
    www.levelfourdevelopment.com
    *************************************

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012