[英]using one input file with two different form
Is there a way to using a input file with two different form? 有没有办法使用两种不同格式的输入文件?
I need only one input file and have to post this file to .php page depending of user selection. 我只需要一个输入文件,并且必须根据用户选择将此文件发布到.php页面。
Thanks. 谢谢。
<label for="file">Photo:</label>
<input type="file" name="file" id="file">
<form action="c.php" method="post" enctype="multipart/form-data" >
<input type="submit" name="submit" value="C">
</form>
<form action="d.php" method="post" enctype="multipart/form-data">
<input type="submit" name="submit" value="D">
</form>
您可以根据值C或D重定向到包含c.php或d.php的页面cd.php。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.