close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding Photo Upload to users_update.php

Thread began 2/05/2014 2:34 pm by david323147 | Last modified 2/07/2014 3:16 pm by Jason Byrnes | 1051 views | 23 replies |

david323147

Adding Photo Upload to users_update.php

My users_date page is working fine but I need to add the ability to upload a photo and then have it appear on the users_detail.php page. Here are the steps I took:
1. Created the new div on the update page and added a file field from the insert>forms menu.
2. WebAssist>File Manipulation>Upload.
3. I configured the settings as shown in the two images attached. The upload folder was created earlier.
4. Uploaded the users_update.php file and webassist folder to my remote server.
5. When I try uploading a photo, it doesn't appear in the remote folder. I get no error messages.

Once this is working, can I have the image appear on the users_detail.php page by dragging the binding for the photo from the bindings panel?

I am attaching my users_update.php file.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

for file upload to work, the form method needs to be set to multi part form data.

select the form tag, then in the property inspector, change the encoding type to multipart/form-data

Sign in to reply to this post

david323147

Great, thank you! That is working now.

But now I'm trying to get the image to appear on the users_detail.php page. I'm following the tutorial "Add file fields to Data Bridge insert / update pages
". When I do Insert>Image and click on the Data Sources button, I get a dialog box saying, "This feature is used in documents that execute on the testing server. Would you like to change the type of the current document?" There are No and Yes options. No just brings me back to the select an image dialog and I don't think I want to change the document type. I do have a testing server setup but I've been building the site on the remote server and really not using the testing server. I want to do this on the remote server.

I'm attaching the users_detail.php page for your perusal.

Thanks Jason, you've been a TREMENDOUS help so far!

Sign in to reply to this post

Jason ByrnesWebAssist

the dreamweaver site settings must be set to connect to a server for testing. you can set this up to use the remote server settings for the testing server in the site, but the testing server is needed for dynamic development.

when you go to the bindings tab, can you access the dynamic bindings?

if not, you need a testing server defined.

Sign in to reply to this post

david323147

I changed my settings in DW so that the remote server is both the remote and testing server. When I go to the Bindings panel and try to access the Recordset (WADAUsers), I get the following error:
HTTP Error Code 404 File Not Found. Here are some possible reasons for the problem:


1) There is no testing server running on the server machine.
2) The testing server specified for this site does not map to the http://letsparksfly.com/www/test/_mmServerScripts/MMHTTPDB.php URL. Verify that the URL Prefix maps to the root of the site.

If I configure DW so that my local server is the testing server and in my database definition I select the remote server, everything else had been working. This is how I have been doing things.

And yes, I can access the dynamic bindings in the bindings panel. I can see all the records under RecordsetWADAusers except the one for this image record.

Sign in to reply to this post

Jason ByrnesWebAssist

i would think the url for the testing server should be :

http://letsparksfly.com/test/


instead of http://letsparksfly.com/www/test/

Sign in to reply to this post

david323147

Well, I changed it to http://letsparksfly.com/test/, I can still access everything from the bindings and server behaviors panels, but when I click the Data Source button on the insert image dialog box, I still get "This feature is used in documents that execute on the testing server.Would you like to change the type of the current document?" Then the No or Yes buttons.

Sign in to reply to this post

Jason ByrnesWebAssist

try adding the image element using a static source, then in code view, replace the image name with the recordset binding.

Sign in to reply to this post

david323147

Okay, I manually added the binding and was able to drag the binding to the spot I want the image to appear and it works. BUT, I had to manually enter the image path for the record for the chosen record (doing so though phpMyadmin). The users_update.php page uploads the file to the directory, but it doesn't update the the appropriate column for that user in the table.

I've attached the users_update.php file.

Sign in to reply to this post

Jason ByrnesWebAssist

you have to edit the update record serve behavior and bind the image column to he server file name from the upload.


see this tutorial for details:
http://www.webassist.com/tutorials/Add-file-fields-to-Data-Bridge-insert-update-pages

Sign in to reply to this post
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...