cmzone Posted August 19, 2008 Share Posted August 19, 2008 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>' Quote Link to comment Share on other sites More sharing options...
matmunn14 Posted August 19, 2008 Share Posted August 19, 2008 You could try <input type="button" onclick="form1.submit();form2.submit()" /> I haven't tested this so it may not work. Quote Link to comment Share on other sites More sharing options...
haku Posted August 19, 2008 Share Posted August 19, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.