当用户需要添加事件时,我有此代码,他必须使用上传图片来填写表单信息以进行广告
<form action="newevent.php" method="post">
<table>
<tr>
<td> Title :</td>
<td><input type='text' name='title'/></td>
</tr>
<tr>
<td colspan="4">Add Your Ads
<input type='file' name='ads'/>
</td>
</tr>
</table>
</form>
在 neweventphp 我写了这段代码
<?php
$target_folder = "project_img/";
$target_file = $_FILES['ads']['name'];
$target_file_path = $target_folder.$target_file;
if(move_uploaded_file($_FILES['ads']['tmp_name'], "company_img/".$_FILES['ads']['name']))
{echo "";}
$title=$_POST['title'];
$query1=mysql_query("INSERT INTO event VALUES('','$title','$target_file_path')");
?>
问题是图片没有存储在数据库中:(你能帮我吗?