prabin04 Posted November 13, 2014 Share Posted November 13, 2014 (edited) what's wrong with this ? i can't upload if( isset($_POST['btn_add']) ) { $content=mysql_real_escape_string($_POST['content']); $title=mysql_real_escape_string($_POST['title']); $objPage->add_page($title,$content); if(isset($_FILES['image_name'])){ $image_name= $_FILES['image_name']; $upload_dir = "/var/www/cms/admin/upload/"; $upload_file = $upload_dir.$_FILES['image_name']; $objPage->add_image($image_name,$upload_file); Edited November 13, 2014 by prabin04 Quote Link to comment Share on other sites More sharing options...
Barand Posted November 13, 2014 Share Posted November 13, 2014 I suggest you read the example on this page http://php.net/manual/en/features.file-upload.post-method.php and see how the $_FILES should be accessed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.