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]

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.