This is a discussion on "upload images in database and folder" within the PHP Forum section. This forum, and the thread "upload images in database and folder are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
upload images in database and folder
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
hi, i have a problems that's problem is that i am 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, may y have know any methed plz help me that.
yours regarded dharmendra <? $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"; } } } ?> |
|
|
|
|||
|
Re: upload images in database and folder
Depending on what exactly you want to do with the images, there are a number of php functions you need to be aware of. Go here and look at them: http://uk2.php.net/manual/en/functio...opyresized.php The page name in the url is just to get you to the right area. You will see all the graphic functions listed down the left-hand side of the page. As far as database storage is concerned, I'm assuming you are using mysql so you will need to be defining your fields using a 'blob' field to store your image. It is also worth storing things like the file type, mime type, etc., as this will make future manipulation easier. |
![]() |
| Tags |
| upload, images, database, folder |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Viewing images in folder | R8515198 | Web Page Design | 8 | Dec 6th, 2007 07:13 |
| Developing a database & upload | Aso | Databases | 8 | Nov 23rd, 2007 06:59 |
| Php image upload to database issue | longstand | PHP Forum | 5 | Nov 21st, 2007 09:45 |
| Calling images in a banner from a folder | ketansethi | Flash & Multimedia Forum | 4 | Oct 28th, 2007 07:53 |
| cannot update images in the folder | begeiste | PHP Forum | 2 | Sep 18th, 2007 18:38 |