upload image

From: Date: Thu, 24 Aug 2006 07:38:12 +0000
Subject: upload image
Groups: php.general 
Request: Send a blank email to php-general+get-241071@lists.php.net to get a copy of this message
Hi, I have problems with uploading image, here is the code if(isset($_POST['txtTitle'])) { $albumId = $_POST['cboAlbum']; $imgTitle = $_POST['txtTitle']; $imgDesc = $_POST['mtxDesc']; $images = uploadImage('fleImage', GALLERY_IMG_DIR); if ($images['image'] == '' && $images['thumbnail'] == '') { echo "Error uploading file"; exit; } $image = $images['image']; $thumbnail = $images['thumbnail']; if (!get_magic_quotes_gpc()) { $albumName = addslashes($albumName); $albumDesc = addslashes($albumDesc); $imgPath = addslashes($imgPath); } $sql = "INSERT INTO tbl_image (im_album_id, im_title, im_description, im_image, im_thumbnail, im_date) VALUES ($albumId, '$imgTitle', '$imgDesc', '$image', '$thumbnail', NOW())"; mysql_query($sql) or die('Error, add image failed : ' . mysql_error()); echo "<script>window.location.href='index.php?page=list-image&album=$albumId';</script>"; exit; } when I upload a picture return me error uploadin image. Thanks -- View this message in context: http://www.nabble.com/upload-image-tf2157181.html#a5959218 Sent from the PHP - General forum at Nabble.com.

« previous php.general (#241071) next »