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 - $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");
Go to your db_name in your php my admin panel
-> and select your table
->select ads table
->and click Structure menu
->and point the image row and click (Action) Change
-> look the failed Length/Values
-> change the values in 50 or 25
-> click save
now run your program and check once again ...
The problem is the length is overflow
have a nice day
2 1618
Double check your field definition in the table.
Go to your db_name in your php my admin panel
-> and select your table
->select ads table
->and click Structure menu
->and point the image row and click (Action) Change
-> look the failed Length/Values
-> change the values in 50 or 25
-> click save
now run your program and check once again ...
The problem is the length is overflow
have a nice day
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Gary |
last post by:
Morning all,
I have a form field called:
Bsk01
How do I onBlur prompt the user to enter a ZERO as character one, if one is
not already entered. At the same time, I would like to ensure at...
|
by: D.Frangiskatos |
last post by:
Hi,
I have been working for a few months in project that deals
raw sockets. However recently, and while trying to examine
the contents of the buffer used in recvfrom i was a bit
confused. The...
|
by: seanmayhew |
last post by:
Im having a small problem with my Dataview sort. Its sorting correctly
on the first character but after thats it seems random so for a state
list at the "W's" it looks like this:
WA
WV
WY
WI...
|
by: bmayer |
last post by:
I am using a SqlDataSource to put data into a database from three
TextBoxes.
The problem is that only the first character from the TextBoxes is
being inserted into the database.
The code:
...
|
by: Frank |
last post by:
There must be an easier way then what I'm doing to determine if the first
character in a string is a valid letter.
My code is getting to big. There must be a better way.
Thanks in advance
|
by: manu99 |
last post by:
hi all,
I have developed a console application with MFC and unicode supported using Visual studio.net 2003.
The problem I have is that the output stream is displaying only the first character in...
|
by: sovht |
last post by:
System: Intel, Windows XP Pro, SP2
IDE: VC++ 6.0
Problem: *Very* simple program to create a MessageBox only ever displays the first character of the given string.
I checked the spec for the...
|
by: Academia |
last post by:
I want to search for Dim and replace it with Dim
That is, I want to change the first character of Dim variable names to upper
case.
I can't figure know to use Regular Expression to do that....
|
by: bdbeames |
last post by:
I have a form where I would like to perform some validation using a javascript function. I cant' figure out the RegExp.
function is_number(target) {
target.value = trim(target.value);
...
|
by: ahmadasghar |
last post by:
Hello,
I am a beginner at C# and am using it to develop an application to control a robot remotely. To communicate with the robot I am using UDP. I am able to successfully send instructions to it...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |