表单和文件上传到两个不同的控制器

I have a form that I want to submit with one submit button.

However my action to upload a file is a different controller then the database posts. it looks like this...

<form method="post" action="/admin/upholstery_product/add/">
<h3>Add a Product</h3>
Frame: <input type="text" name="productname" /><br>

Parent Category:
<select name="category">
    <?php
    foreach($cats AS $cat){
        $sel = ($curCat->category_id == $cat->category_id) ? 'selected' : '';

        echo "<option value='".$cat->category_id."' ".$sel.">" . $cat->category_name . "</option>
";
    }
    ?>
</select><br />

Family: <input type="text" name="family" /><br>

Width: <input type="text" name="width" size="6" /><br>

Height: <input type="text" name="height" size="6" /><br>

Depth: <input type="text" name="depth" size="6" /><br>

Seat Width: <input type="text" name="seat_width" size="6" /><br>

Seat Height: <input type="text" name="seat_height" size="6" /><br>

Seat Depth: <input type="text" name="seat_depth" size="6" /><br>

Arm Height: <input type ="text" name="arm_height" size="6" /><br>

Features: <textarea cols="40" rows="20" name="features"></textarea><br>

<form method="post" action="/upload/product_image_upload">
Image File: <input type="file" name="image" id="image"/><br>
</form>

<form method="post" action="/upload/product_image_upload">
Thumbnail File: <input type="file" name="thumbnail" id="thumbnail"/><br>
</form>

<form method="post" action="/upload/pdf_upload">
PDF File: <input type="file" name="pdf" id="pdf"/><br>
</form>

Status: <select name="status">
        <option value="active">Active</option>
        <option value="inactive">Inactive</option>
        </select> <br>


<input type="submit" name="submit" value="Add Product" /><br>
</form>

is there a way to post the file actions to one controller and the submit to my other controller with a single submit button? right now the code doesnt work.

What you want to do is, strictly speaking, not possible: You have two separate forms on one page, andf you want to submit both simultanously.

The main problem here is this: The result of a submitted form is a new page. Different actions = different pages. Which one do you want to display?

Workaround: Submit both the file and the data to the same script; if the handlers need to be separate, make the first handler post the data to the second handler "behind the scenes".