franknu Posted December 22, 2006 Share Posted December 22, 2006 i want to upload more than one file the other files i want to update are called Picture2 and Picture 3here is my code [code=php:0]$uploaddir = '/home/townsfin/public_html/business_images/';$uploadfile = $_FILES['Picture1']['name']; // if(!empty($_FILES['Picture1'])){ var_dump($uploaddir); var_dump($_FILES['Picture1']['size']); var_dump($_FILES['Picture1']['error']); var_dump($_FILE); var_dump($_FILES['Picture1']['type']); var_dump($_FILES['Picture1']['name']);}$fullpath = $uploaddir . $uploadfile;if (move_uploaded_file($_FILES['Picture1']['tmp_name'], $fullpath)){ echo("File Uploaded"); $sql="INSERT INTO `business_info`(`BusinessName`,`Slogan`,`Business_Address`,`Tel`,`Website`,`Email`, `Fax`,`type`,`make`,`Categories`,`Keyword`,`Picture1`,`Headline`,`Slogan2`,`Description1`,`Description2`,`Description3`, `Picture2`,`Picture3`,`User_Name`,`Password`)Values('$BusinessName','$Slogan','$Business_Address','$Tel','$Website','$Email','$Fax','$type','$make','$Categories','$Keyword','$fullpath','$Headline','$Slogan2','$Description1','$Description2','$Description3','$Picture2','$Picture3','$User_Name','$Password')"; $result = mysql_query($sql); if (!$result){ echo "Error inserting data: " . mysql_error(); }}else { echo ("file no uploaded!"); print_r($_FILES); echo realpath('./');}[/code]Please help Link to comment https://forums.phpfreaks.com/topic/31600-uploading-more-than-one-file/ Share on other sites More sharing options...
franknu Posted December 23, 2006 Author Share Posted December 23, 2006 should change the codes to get ti insert more than one file in my scripts Link to comment https://forums.phpfreaks.com/topic/31600-uploading-more-than-one-file/#findComment-146908 Share on other sites More sharing options...
franknu Posted December 23, 2006 Author Share Posted December 23, 2006 ok i had looked everywhere and i dont see how i can upload multiples files in with php please help i am sure u guy have seem that before Link to comment https://forums.phpfreaks.com/topic/31600-uploading-more-than-one-file/#findComment-146953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.