ronanlawlor Posted December 4, 2010 Share Posted December 4, 2010 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] Quote Link to comment Share on other sites More sharing options...
Zurev Posted December 4, 2010 Share Posted December 4, 2010 A bit more information would be helpful, so the images are being stored in a database and not being written to a directory? And can we see the actual code where that happens? Quote Link to comment Share on other sites More sharing options...
ronanlawlor Posted December 4, 2010 Author Share Posted December 4, 2010 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] Quote Link to comment Share on other sites More sharing options...
ronanlawlor Posted December 5, 2010 Author Share Posted December 5, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.