close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Image Insert into database issue after using DataBridge

Thread began 10/25/2012 9:12 am by info441120 | Last modified 10/27/2012 1:09 am by info441120 | 982 views | 4 replies |

info441120

Image Insert into database issue after using DataBridge

Good evening all

Well I am starting to pull my hair out. I have an upload file to my database. Data uploads but my image only does half the job. The img uploads to the image folder, but doesn't display as it is not getting written into the database. I went through the tutorials on how to change your form to take care of images. NO Joy.

I now have the second problem that when I update a record it is resetting the "prod_ID to 0". Not sure why this happening.

I will upload my source code, to see if anybody can notice the obvious.

Please help if able.

regards

Matt

Attached Files
tb_instruments_update.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the problem with the image name not getting stored to the database is because of code order.

the update code is at lines 4 - 44.

the image upload code is at lines 88 - 118

The image upload code needs to be moved so that it comes before the code to update the record.


The problem with the ID being set to 0 is happening because you have bound the prod_id column in the update record to a prod_id form element that does not exist.

in the update, prod_id column should not be bound to anything so that it will not get changed.

Sign in to reply to this post

info441120

Hi Jason

Thanks for help. It worked a treat. Managed to work out the prod_ID bounding issue as well.

After doing this it has come up with one problem though.

Its saying the following: "Warning: Cannot modify header information - headers already sent by (output....

I was able to get rid of the error by hiding the line in question, but then my page doesn't redirect.

Is this caused by moving the location of the code, that I had to do???

Thanks heaps again for all your help

Sign in to reply to this post

Jason ByrnesWebAssist

most likely on moving the code, you left spaces or blank lines between php code blocks.

see the following for details on the cause of that error and troubleshooting:
showthread.php?t=19285

Sign in to reply to this post

info441120

Hi Jason

Thanks once again. It was the space in between the endin php tag and the beginning of a new one.

Really appreciated all the help.

Thanks very much

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...