I am trying to add this image name into my db but it just takes the first character of the name.
like if the image named JACK it takes 'J' only to my table
this is the var I am pointed to
at line 14
like if the image named JACK it takes 'J' only to my table
this is the var I am pointed to
Code:
$imageUp
Code:
$uploadsDirectory = 'includes/adsImages/'; $fieldname = 'image'; $errors = array( 1 => 'php.ini max file size exceeded', 2 => 'html form max file size exceeded', 3 => 'file upload was only partial'); @getimagesize($_FILES[$fieldname]['tmp_name'])or error('يسمح فقط برفع الصور'); $now = time(); while(file_exists($uploadFilename = $uploadsDirectory.$now.'-'.$_FILES[$fieldname]['name'])){ $now++; } $imageUp=move_uploaded_file($_FILES[$fieldname]['tmp_name'], $uploadFilename); echo "تم إضافة الأعلان و صورة الأعلان بنجاح<br />سوف يتم عرض أعلانك خلال 48 ساعة عمل المزيد"; $putData="INSERT INTO ads(id, kind, cat, name, email, mobile, landPhone, ads_tiltle, use_price, ads_description, dateAdd, image)VALUES ('', '$catid', '$kind', '$name', '$email', '$mobile', '$landPhone', '$adsSubjuct', '$price', '$adsDetails', NOW(), '$imageUp')"; $QputData=$db->query($putData)or die("$db->error");
Comment