Jump to content

Problem uploading images sine PHP Upgraded


ronanlawlor

Recommended Posts

Hi All,

 

This has been driving me crazy for a while now. I was on an older version of PHP and everything was working fine but a few weeks ago my hosting upgraded the PHP to version 5 (I think) and I have started to get problems. I have a form that is completed and also 5 images can be added and then submitted which should save it to the database. But the images are not being saved anymore.

 

I have attached the code that I am using and it did work before.

 

On another note I was having a problems with the other fields on the forms where characters such as ! or , etc would cause problems. I got over this by using '.mysql_real_escape_string'. Should I be doing something like this for the images that I want to upload?

 

I hope I am making sense.

 

Thanks

 

[attachment deleted by admin]

Thanks for the reply Zurev.

 

I am not 100% sure what is happening to be honest. I have recently taken over the work on this so I am still going through all the code. I have attached some more code. Basically the user selects the images they want, they are uploaded to the database but they are not pulled back correctly. I'm not sure if the problem is when the user submits the images or when the code is pulling them back. I have attached some more code.

 

Before the version of PHP was upgraded everything was OK. THe images that were uplaoded prior to the upgrade are still working OK and can be viewed with no problems.

 

[attachment deleted by admin]

The images should be uploaded to a folder called: advertisement_thumbnail - This is not happening.

 

Within the database the advertisment details are added to the table called 'tbl_advertisement'. The field 'fld_image1' should be populated with the file name of the first image i.e. '116reception.jpg'. 116 is the 'fld_adv_id' and the remaning part is the image name - This is not happening.

 

Any tips to send me in the right direction would be greatly appreciated.

 

Thanks

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.