close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File upload not working

Thread began 11/22/2022 8:55 am by tmcbinc99963 | Last modified 12/08/2022 2:02 pm by Ray Borduin | 246 views | 18 replies |

tmcbinc99963

File upload not working

Using web assist products, I've created a product update page. This page has a file upload that allows users to upload a testimonial for a specific product. When a new file is selected for upload, the filename appears in the text box correctly. However, after uploading, the page refreshes to show the same filename as before. And looking at the website, the old testimonial still appears.

The form data looks correct in the source code. I've included the compressed update.php file and will add viewing info in the private message area.

Please let me know if you need anything further.

Sign in to reply to this post

Ray BorduinWebAssist

It doesn't look like you are updating the database with the new file name after it is uploaded. What table and column are you trying to save the new file in? You probably just have to go into the Update server behavior and bind the column to update it with the newly uploaded file. It looks like you are only updating the columns: "LubeTestim_ID|LubeFK_ID|TestCom_ID|TestProd_ID" and you need to also update: "testim_doc"

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

Attached are screen shots of the server behavior (Wizard for TestimFile) and Binding for same.

The Testimonials (testim_doc) and Prod_Lube_testimonials (LubeTestimID) both need to be updated, which are in two related tables.

I believe you helped me with this one before, but has since stopped working correctly. Out of my league here.

Sign in to reply to this post

Ray BorduinWebAssist

That is the file upload code. That part is working. It is the Database Update server behavior that hasn't been updated to save the value of the uploaded file in the database.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

Attached are screen shots of the Update Server Behavior. Will this update the records in both tables?

There's also an update multiple records server behavior, but it's for 'prodtype'.

Do I need to create an 'update multiple records server behavior to update both tables?

Sign in to reply to this post

Ray BorduinWebAssist

What column in what table do you want the file name to be updated in? I imagine it is only one table and one update that has to be changed. I'm afraid I don't know enough about your application and database structure to tell you more than that. I would imagine it is only one table.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

Attached is a pdf file indicating the tables and columns that need updating.

On file upload, the filename needs to update in the Testimonials table, and the ID from that table is used to update a Prod_Lube_testimonials table.

I can send login credentials for access to the admin site and database if that would help.

Sign in to reply to this post

Ray BorduinWebAssist

Your file upload default value is set to:

$row_TestimCo['testim_doc']

But then your update server behavior on lines 262-302 only updates the columns: "LubeTestim_ID|LubeFK_ID|TestCom_ID|TestProd_ID";

It seems you would just have to add the "testim_doc" column to that update server behavior.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

I'm getting the following error message when I upload a new testimonial file:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `ProdLubeTestim_ID`=2' at line 1

Sign in to reply to this post

Ray BorduinWebAssist

Please attach the latest version of the .php page you are working on that has the error so I can look at the code.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

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