Hi, I am using codeigniter for multiple file uploading and it is giving me serious problems. The data from the files are coming to my controller. But when I try to run the upload script it gives me error that the A PHP Error was encountered Severity: Warning Message: Illegal offset type in isset or empty Filename: libraries/Upload.php Line Number: 147 Also if this error does not occur. Then another error occurs.You did not select file to upload.My multiple uploading script is here. The problem is that the values are coming in the $value variable bur they are not uploading.Please …

Member Avatar
Member Avatar
+0 forum 2

gud day! why my upload files not really uploading in my online server? im using this ref. http://www.tizag.com/phpT/fileupload.php but in offline its working the file upload was move to my localhost folder.

Member Avatar
Member Avatar
+0 forum 7

I am new to PHP and I am having some problems and I am hoping someone can point me in the right direction. Here is what I need to do: Create a Web Form for uploading pictures for a high school reunion. The form should have text input fields for the person's name and a description of the image, and a file input field for the image. To accompany each file, create a text file that contains the name and description of the image. Create a separate Web Page that displays the pictures with a caption showing the name and …

Member Avatar
Member Avatar
+0 forum 1

I am trying to upload multi-images I am using this script everything is fine and the images uploaded successfully the problem here is I don't want to duplicate the images name so I used this script to avoid this but no luck any idea this is my code <?php if(isset($_POST['submit'])){ $target = '../images/Projects/'; $num=1; $projectID=$p; foreach ($_FILES["img"]["error"] as $key => $error){ if ($error==UPLOAD_ERR_OK){ $tmp_name = $_FILES["img"]["tmp_name"][$key]; $name = $_FILES["img"]["name"][$key]; move_uploaded_file($tmp_name, "$target/$name"); if(file_exists($name)){ $duplicate_filename = TRUE; $i=0; while($duplicate_filename){ $filename_data=explode(".", $_FILES['img']['name']); $new_filename=$filename_data[0] . "_" . $i . "." . $filename_data[1]; $_FILES['img']['name']=$new_filename; $name="$target".$_FILES['img']['name'].""; if(file_exists($name)) { $i++; } else { $duplicate_filename=FALSE; } } } …

Member Avatar
Member Avatar
+0 forum 7

Hello. I am having a hard time in figuring out how to view the pdf file after uploading it in your system. My plan is retrieved PDF files that is stored in mysql database and display them in the browser when the user click the view button. please help me. Currently, here is my code.. <?php if (isset($_GET['id'])) { $file = $_GET['id']; if (file_exists($file) && is_readable($file) && preg_match('/\.pdf$/',$file)) { header('Content-Type: application/pdf'); header("Content-Disposition: attachment; filename=\"$file\""); readfile($file); } } else { header("HTTP/1.0 404 Not Found"); echo "<h1>Error 404: File Not Found: <br /><em>$file</em></h1>"; } ?> it doesn't displaying the pdf file. please …

Member Avatar
Member Avatar
+0 forum 1

Hello, Good evening! I am trying to validate my atachments in my system. In my program, there is an upload button, what I am trying to do is to validate it by not copying and saving the upload file once it already exists in the database..... HERE IS MY CODE: If System.I.O.Exists(FileToCopy)=True Then System.I.O.File.Copy(FileTo Copy, NewCopy) Else MsgBox("File already exist") but it is not working, any file uploaded eventhough it is not yet existing in the database is not saving... .....Hope you could help me in this dilemma...

Member Avatar
Member Avatar
+0 forum 3

Hi, I have a script that sends uploaded images to my images folder on my web server. Im not sure but I think it also renames the images (which is what I want to happen). Could someone please take a look at this script for me and tell me if it does rename the images? I also want the script to send the name of the image, after it's renamed, to the database table in row labeled 'images'. Could someone help me with this? Heres the script: <?php // define a constant for the maximum upload size define ('MAX_FILE_SIZE', 1024 …

Member Avatar
Member Avatar
+0 forum 2

Hi, I want users on my website to upload their company logo (if they have one) while filling out my form. Right now i only have one row designated for the company logo called 'images' with the type set to BLOB. Is this adequate for both uploading images and displaying them on my website? Another thing, I used dreamweaver's 'insert record' server behaviour to generate a script that causes my form to insert data into my database table. One line that I'm curious about is the following: ` GetSQLValueString($_POST['upload'], "text"),` Do I need to change 'text' to something other then …

Member Avatar
Member Avatar
+0 forum 10

i have following form in html: <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> and my upload_file.php is in the following: echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; if i install the wamp in c-drive it access the `tmp` accurately and upload the file into the folder. but if i install the wamp into d-drive it couldn't work properly. what the problem with this???

Member Avatar
Member Avatar
+0 forum 5

hi i am working in php. and my assigned task is to upload a file and save it into the directory. i have install wamp into D-drive but it not working and dont get the path. i was trying the following: <?php echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; ?> its don't get the path of `tem_name` while if i install the wamp into C: it gets the folder and store the file into it. what the …

Member Avatar
Member Avatar
+0 forum 5

<form action="index.php" method="post" enctype="multipart/form-data"> File: <input type="file" name="image"><input type="submit" value="Upload"> </form> <?php //connect to db mysql_connect("localhost","root","")or die(mysql_error()); mysql_select_db ("databaseimage")or die (mysql_error()); @$file =$_FILES['image']['tmp_name'];//kjo eshte e lidhur me <input type="file" name="image"> if (!isset($file)) echo ("Please select an image"); else { $image= addslashes(file_get_contents ($_FILES['image'] ['tmp_name'])); $image_name = addslashes($_FILES['image']['name']); $image_size = getimagesize ($_FILES['image'] ['tmp_name']); if(@$image_size==FALSE) echo "Nuk eshte imazh ky or bir :) hahahahah"; else { if(!$insert =mysql_query ("INSERT INTO store VALUES ('','$image_name','$image')")) echo ('Pati problem ne ngarkim'); else { $lastid = mysql_insert_id (); echo "Image uploaded.<p />Your image:<p /><img src=get.php?id=$lastid>"; } } } ?>

Member Avatar
Member Avatar
+0 forum 4

Hi! I have a form (which is in html(the rest of my coding done in PHP)) that prompts user to choose image, type in title and choose status and after pressing confirm button script uploads image and its details to MySQL database. I'm trying to fade whole screen or disable all buttons on the page or display animation or all of that together to prevent user from pressing submit button few times. Any simple fade function in Javascript, JQuery or Ajax. I know nothing about those languages and don't have much time left to learn it. I've tried for couple …

Member Avatar
Member Avatar
+0 forum 2

I am using Webbrowser control to automate the data entry but there is a file upload control for which i am unable to upload file. The code of target page is : <form name="iform" style="margin:0px;" action="http://test.com" method="post" enctype="multipart/form-data"> <INPUT TYPE="button" value="Change Image" style="width:112px;"> <input id="file" name="image" type=file class=hiddenMask onchange="upload();" this.edit="false"> I am trying to click the **change image** button but its not getting clicked. Please assist on uploading the file automatically.

Member Avatar
+0 forum 0

I am a nood forgive me if all my code is messy, and evrything I know is self taught so my knowledge is not that great. I have an issue, I created an insert record form and in it there is title, price, 8 file upload fields and other fields. every thing somewhat works fine, but the file upload has problems. if I input images into all the 8 file fields and submit the form there is no problem, but if i input 7 or 6 or less, i.e leave one or more file field blank and then try to …

Member Avatar
Member Avatar
+0 forum 3

[B]Hi all, I would ask about fileUpload control, in asp.net 2008 can I know how remaining time to upload file successfully without using threading and without using javascript? the progress bar not problem, the problem that faced me is how to know how much file size was uploaded...[/B]

Member Avatar
Member Avatar
+0 forum 5

Hi, I have this program that would upload files from the client to the server, Now I want to validate the filesize before uploading it into the server.. How can I create this kind of validation? Thanks.

Member Avatar
Member Avatar
+0 forum 2

Hello, I have purchased this software and I am wanting to upload it to make a website and the software came with instructions on how to install it and I would like to ask if you could explain to me what I need to do. Thank you for helping me out. Here is the instructions installation Instructions 1. Open /include/config.php Find: /home/youruser/public_html Replace with the path to your public web directory. Find: [url]http://www.yourdomain.com[/url] Replace with your domain name where you are going to install the script. Find: localhost Replace with your SQL host. Find: dbuser Replace with your database username. …

Member Avatar
Member Avatar
+0 forum 2

Good morning, Firstly, let me say that I have zero experience with database, servers, etc. Now that I have prefaced this long question with that tidbit let me ask the most basic questions. What is the difference between MySQL and MS SQL? I think they do the same thing but I'm not sure of their differences. Next and this requires some explanation so bare with me. Recently, I was elected to update my school club's website. I had said yes despite my little knowledge of HTML but I do understand the basics of programming. One of the tasks I was …

Member Avatar
Member Avatar
+0 forum 3

Hi experts., Can anybody know how to select and upload multiple files using javascript [ with php too ]..? I dont want to use silverlight or flash..! I just need to do it in simple way.. Please help me..! Thanks.,

Member Avatar
Member Avatar
+0 forum 6

[CODE] if(!$this->upload->do_upload()) { //echo $config['upload_path']; $error = $this->upload->display_errors(); echo $error.':err'; //pagal galune .err javasctriptas atskirs kad cia klaida } else { $data = $this->upload->data(); $this->load->model('Image_model','image'); if($data['image_width'] > 700) { $task = $this->image->image_resize_for_gallery('./uploads/gallery/'.$this->input->post('album_folder').'/'.$data['file_name']); if($task != 'ok') { echo $task.':err'; //pagal galune .err javasctriptas atskirs kad cia klaida } } if($this->image->gallery_thumb($this->input->post('album_folder'),$data['file_name'])) { $this->image->gallery_enter_image($data['file_name'],$this->input->post('album_folder')); echo $data['file_name']; } else { echo 'Nepavyko įkelt mažos nuotraukytes:err'; } } [/CODE] When image_width > 700 then thumbnail is not created. So how this part [CODE] if($data['image_width'] > 700) { $task = $this->image->image_resize_for_gallery('./uploads/gallery/'.$this->input->post('album_folder').'/'.$data['file_name']); if($task != 'ok') { echo $task.':err'; //pagal galune .err javasctriptas atskirs kad cia klaida } …

Member Avatar
+0 forum 0

When uploading images using plugins on wordpress I get an HTTP error. The plugins that give me the error are: nexGEN gallery and shopplugin. I have posted multiple threads on the WP support forums and I dont even get replies. The only information I can give is I get an HTTP error when uploading images using these plugins. Media library works fine. I have permission set to 777 on both plugin folders and subfolder, my uploads folder, and gallery folder. everything else in the wp-content folder is set to 755. Can anyone give me some insight on what the issue …

Member Avatar
Member Avatar
+0 forum 3

I want to limit uploading size of the user image. How can i do this? User should upload only jpg file and it would be less than 100kb. and is there any way i can convert that image into specific resolution? Thanks....

Member Avatar
Member Avatar
+0 forum 7

Hi all!! i have PHP script (3 files) for upload images on my hosting server.This script changes the name of images in a unique format before uploading onto the server.I just need to print the name of image file and its path where the image is getting uploaded (like [url]http://www.johnsgallary.net/imageuploader/uploaded_files/124abc.jpg).Please[/url] tell me what code i should insert to do that.. One more thing i want to do ,that ,after uploading the images, the page should show thumbnails views of the images that has currently uploaded.I am new in PHP. :( Please help :) thanks in advance!! :) THE CODE IS …

Member Avatar
Member Avatar
+0 forum 4

I have a website that allows people to come an upload images. When that person uploads an image it renames it according to who is uploading it. So every time that person logs on and changes his image, it will overwrite the old image. That person will only have one image at any given time. If this person logs on and uploads and image and then changes his mind and uploads a different image, I was getting an error that the file was being used by another process. I disposed and garbage collected and now it works fine. I uploaded …

Member Avatar
Member Avatar
+0 forum 2

//i have a problem i have made an edit page and it is working properly and i have done image uploading in it but if the user updates without uploading any image its previous image is removed can any body help me how to get the previous image my code is here. [code] if(isset($_REQUEST['update'])) { $sid=$_REQUEST['id']; $sql="SELECT * FROM tbl_student WHERE std_id='$sid'"; $result=mysql_query($sql); // $stdid=$_REQUEST['studentid']; $stdfname=$_REQUEST['fname']; $stdlname=$_REQUEST['lname']; $stdreg=$_REQUEST['reg']; $stddob=$_REQUEST['dob']; $stddoj=$_REQUEST['doj']; $name=$_FILES['uploadedfile']['name']; $type=$_FILES['uploadedfile']['type']; $size=$_FILES['uploadedfile']['size']; $check=$_FILES['uploadedfile']['name']; $uname=str_replace(" ","_",$name); $tmp_name=$_FILES['uploadedfile']['tmp_name']; $target_path = "uploads/"; //$file=getimagesize($target_path); $target_path = $target_path . basename($uname); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { list($width,$height,$siz,$attr)=getimagesize($target_path); if($siz==0) { echo "You have not chosen an image please …

Member Avatar
Member Avatar
+0 forum 3

Hi, I have a function that I use within my upload script that creates a thumbnail of each image that is uploaded (using php's GD library). The problem is, the thumbnails look absolutely horrible. They are not so much distorted, but just VERY blurry. Here is my function that is creating the thumbnails: [CODE] function create_thumb($pathToImage, $pathToThumb, $thumbWidth) { $img = imagecreatefromjpeg($pathToImage); $width = imagesx($img); $height = imagesy($img); $new_width = $thumbWidth; $new_height = floor($height * ($thumbWidth / $width)); $tmp_img = imagecreatetruecolor($new_width, $new_height); imagecopyresampled($tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height); imagejpeg($tmp_img, $pathToThumb); imagedestroy($tmp_img); imagedestroy($img); } create_thumb('uploads/' . $name, …

Member Avatar
Member Avatar
+0 forum 4

Hi everyone, I have been working on an image gallery to allow people to view/upload their photos. I have everything working pretty well except that I want to modify my upload script so that a thumbnail is generated of each picture that is uploaded and stored in a separate directory with the same name as the original picture. So there would be an "Uploads" directory where all full size images are stored, and then within that directory there would be a "Thumbs" directory where all the thumbnails will be stored (with the same name as the full size image). My …

Member Avatar
Member Avatar
+0 forum 3

I have downloaded and implemented Uploadify because users were tired of having to browse to each and every file they needed to upload(since this is used for uploading multiple pictures) allows a user to select multiple pictures at once without having to click a "BROWSE" button to go fetch each picture. The problem is, I NEED to use MY upload.php script in order for it to meet the needs of my project. However, i'm not all that great at php, and it took me hours to get my own upload script to work. Now, I don't know how to get …

Member Avatar
Member Avatar
+0 forum 1

I have created a script that lets you upload multiple pictures, but the down side is that I have to browse to each and every picture to select it. - Which is very inefficient, especially because I am putting this all together for a photographer to allow her to upload photos for her clients to view (which cab be up to 100 pictures per client). Is there a way to upload multiple pictures at one time without having to browse to each and everyone to select it? The thing is, my script also inserts the path of the picture into …

Member Avatar
Member Avatar
+0 forum 4

Hello all, Unfortunately I have this bad habit of turning to this magnificent community only with requests for helping hand on malware issues, but since that's the root nature of this part of the forum, I can just say that I'll be happy to drop by more frequently in future. The computer I'm having problems with has Eset NOD32 installed, but as expected prior to this post, I've read the sticky topics on the top, installed and ran all the necessary scans, saved out logs etc. Firstly - I've ran full system scan with ESET, ending up with one found …

Member Avatar
Member Avatar
+1 forum 11

The End.