将文件从表单发布到另一个页面


Posting file from form to another page

<form id="form1" name="form1" align="center" action="http://www.test.org/add-listing/?listing_type_id=test" method="POST" enctype="multipart/form-data">
<input type="file" Value="UPLOAD RESUME" id="UploadResume" name="UploadResume" >
<br>
<input type="submit" Value="Upload Resume" id="SubmitResume" >
</form>

我正在尝试将表单数据发布到另一个页面;但是,它似乎正在尝试转到http://www.test.org/add-listing

而不是

http://www.test.org/add-listing/?listing_type_id=test

我在这里缺少什么吗?

表单方法POST,因此无法通过GET传递数据(URL(

如果要传递该值,可以使用隐藏输入:

<input type="hidden" name="listing_type_id" value="test">

您将能够用$_POST["listing_type_id"]在另一边获得它