PHP表单未上载图像
我在使用表单上传图像时遇到问题。这是我的表格代码:PHP表单未上载图像,php,mysql,image,upload,Php,Mysql,Image,Upload,我在使用表单上传图像时遇到问题。这是我的表格代码: <?php echo '<table width="70%">'; echo '<tr>'; echo '<td>Add Promotion</td>'; echo '</tr>'; echo "<form action='addpromotion_post.php' method='post' enctype='multipart/fo
<?php
echo '<table width="70%">';
echo '<tr>';
echo '<td>Add Promotion</td>';
echo '</tr>';
echo "<form action='addpromotion_post.php' method='post' enctype='multipart/form-data' name='form1' id='form1'>";
echo '<tr>';
echo "<td> </td>";
echo '</tr>';
echo '<tr>';
echo "<td>Promotion :</td>";
echo "<td><textarea name='promotion1' rows='2'></textarea></td>";
echo '</tr>';
echo '<tr>';
echo "<td>Valid From :</td>";
echo "<td><input type='text' size='40' name='validfrom1' value='promotion' /></td>";
echo '</tr>';
echo '<tr>';
echo "<td>Add Picture :</td>";
echo "<td><input type='file' name='pic1' id='pic1' /></td>";
echo '</tr>';
echo '<tr>';
echo "<td>Add Picture :</td>";
echo "<td><input type='file' name='pic2' id='pic2' /></td>";
echo '</tr>';
echo '<tr>';
echo "<td>Add Picture :</td>";
echo "<td><input type='file' name='pic3' id='pic3' /></td>";
echo '</tr>';
echo '<tr>';
echo "<td> </td>";
echo '</tr>';
echo'<tr>
<td colspan="3" align="center"><input type="submit" name="button" id="button" value="Submit" /></td>
</tr>
</table>
</form>';
echo';
回声';
回音“添加促销”;
回声';
回声“;
像这样改变
echo "<form action='addpromotion_post.php' method='post' enctype='multipart/form-data' name='form1' id='form1'>";
echo '<table width="70%">';
echo '<tr>';
echo '<td>Add Promotion</td>';
echo '</tr>';
echo”“;
回声';
回声';
回音“添加促销”;
回声';
非常感谢。工作完美:D
echo '<table width="70%">';
echo '<tr>';
echo '<td>Add Promotion</td>';
echo '</tr>';
echo "<form action='addpromotion_post.php' method='post'
enctype='multipart/form-data' name='form1' id='form1'>";
echo "<form action='addpromotion_post.php' method='post' enctype='multipart/form-data' name='form1' id='form1'>";
echo '<table width="70%">';
echo '<tr>';
echo '<td>Add Promotion</td>';
echo '</tr>';