-1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>New Post</title>
</head>
<body>
<p> Sub-Category: <select><option id="subCtgry"></option></select></p>
<p> Location: <select><option id="lctn"></option></select></p>
<p> Title: <input type="text" name="ttl" size="80"></p>
<p> Price: <input type="text" name="prc" size="10"></p>
<p> Description: <textarea class="scrollabletextbox" name="prc" style="width:600pt;height:100pt;overflow:scroll"></textarea></p>
<p> Email: <input type="text" name="email" size="80"></p>
<p> Confirm Email: <input type="text" name="cEmail" size="80"></p>
<p>I agree with terms and conditions <input type="checkbox" name="chckbx"></p>
<form>
Optional Fields:
<br>
<br>
Image 1 (Max 5 MB): <input type="file" name="img1" size="4MB">
<br>
<br>
Image 2 (Max 5 MB): <input type="file" name="img2">
<br>
<br>
Image 3 (Max 5 MB): <input type="file" name="img3">
<br>
<br>
Image 3 (Max 5 MB): <input type="file" name="img3">
<br>
<br>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</body>
</html>
我想写一个PHP文件来接受来自上面新帖的用户输入。并且还希望在用户确认之前向用户展示预览。我能怎么做?谢谢你的帮助。PHP文件接受用户输入
您需要显示文件进行确认上传,或确认可以通过用户 –
上传第二种情况下的文件,以便使用JS中的File。 –
凌乱的HTML。 form标签应该包含所有输入类型标签。请求是获得还是发布。表单应该包含提交文件类型数据的多部分表单数据。参考:https://www.w3schools.com/php/php_file_upload.asp – Priya