0

我想使用blueimp 插件在文件上传成功时更新数据库表

说当我的更新完成时,我想运行这个查询

mysql_query("
           UPDATE td_post 
           SET post_name='$p_name'
               ,post_image='$img_url' 
           WHERE user_name='".$_SESSION['logged_user']."'"
           );

但是我找不到应该检查返回结果然后更新查询的地方......

4

1 回答 1

0
error_reporting(E_ALL | E_STRICT);
require('UploadClass.php');
$upload_handler = new UploadHandler();
$path = "your/upload/path/filename";

if(move_uploaded_file($_FILES['files']['tmp_name'][0],$path)){
      //run your query here
}
于 2013-08-02T07:28:58.150 回答