Jump to content

Combine internal and external POST?


groston

Recommended Posts

I have created a simple web site that is used to enter data into a database. Each page essentially has:

<form role="form"  method="post"> ... </form>

The site works without issue. However, I want to add to the form the ability to upload an image file. I wrote a small test page that does this and it works without issue. However, the problem is this: The test page has the following:

<form action="fileUploadScript.php" method="post" enctype="multipart/form-data">

The first <form> uses code on the page itself to do the database insertion, whereas the second <form> uses an external php file to upload the file.

In terms of executing the code, I suspect that I could make this work with two mouse clicks: one to upload the file and the other to enter the data. Is there a way to achieve this with one mouse click? Note that there are a dozen fields or so, and identifying all of them to have the external php file handle them might be a pain...

Thanks.

Edited by groston
removed blank line and unneeded quote
Link to comment
Share on other sites

  • groston changed the title to Combine internal and external POST?
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.