Jump to content

Recommended Posts

Is it possible for me to have one submit button for these two different forms, or possible merge the two forms into one? not really php but I guess the POST process it... (the enctype attribute on the second form messes with the select option if I merge the two)

 

echo 'Product '.$model.' submitted successfully!<br /><br />
Select Maker from the list and Submit the Product Picture 
(picture must have same name as the model name)
<br />
//FIRST FORM
<form action="uploader.php" method="POST">
<select name="modelmaker">
<option>Select</option>
<option>Hanns-G</option>
<option>Acer</option>
<option>HP</option>
<option>Samsung</option>
<option>Viewsonic</option>
<option>BenQ</option>
<option>Dell</option>
<option>Westinghouse</option>
<option>LG</option>
<option>Sony</option>		
</select></form>

//SECOND FORM
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>'

If you want it to be one form, then take out the closing form tag on the first form, and the opening tag on the second form so that you have one long form. Any input/select/radiobutton/checkbox inside those form tags will be submitted with the form.

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.