View Single Post
  #1  
Old 08-11-2006, 02:11 PM
douglas douglas is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
douglas is on a distinguished road
Exclamation image upload in database and folder

Hello guys

The problem is that i want to upload images also in database to add and attach folder, this code is finally worked to add images in attach folder just not to add in database, please advise, thanks.

<?
$pImage = $_FILES['upload']['name'];
if(isset($pImage)){
//echo "File Name: ".$pImage;
//echo "<br>File Temp Name: ".$_FILES['upload']['tmp_name'];
//echo "<br>File Size: ".$_FILES['upload']['size'];
//echo "<br>File Type: ".$_FILES['upload']['type'];
if($_FILES['upload']['size']<(50*1024)){
if(isset($pImage)){
$path="Attach/";
$arrImg=explode('.',$_FILES['upload']['name']);

copy($_FILES['upload']['tmp_name'],$path.$pImage);
}
else{
echo "Image size exceeds 50 kb";
}
}
}

?> -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - image upload in database and folder
View Single Post
  #1  
Old 08-11-2006, 02:11 PM
douglas douglas is offline
Junior Member
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
douglas is on a distinguished road
Exclamation image upload in database and folder

Hello guys

The problem is that i want to upload images also in database to add and attach folder, this code is finally worked to add images in attach folder just not to add in database, please advise, thanks.

<?
$pImage = $_FILES['upload']['name'];
if(isset($pImage)){
//echo "File Name: ".$pImage;
//echo "<br>File Temp Name: ".$_FILES['upload']['tmp_name'];
//echo "<br>File Size: ".$_FILES['upload']['size'];
//echo "<br>File Type: ".$_FILES['upload']['type'];
if($_FILES['upload']['size']<(50*1024)){
if(isset($pImage)){
$path="Attach/";
$arrImg=explode('.',$_FILES['upload']['name']);

copy($_FILES['upload']['tmp_name'],$path.$pImage);
}
else{
echo "Image size exceeds 50 kb";
}
}
}

?> -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote