close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Default profile Image

Thread began 12/28/2012 1:35 pm by neil444064 | Last modified 12/28/2012 4:36 pm by Jason Byrnes | 644 views | 5 replies |

neil444064

Default profile Image

Hello All,
I am creating a profile page and have a default pic for all members in a folder in the root . I want the user to upload his own pic and it auto replaces the default pic. I dont want image in db. How would I do this ? Thanks in advance.

Sign in to reply to this post

Jason ByrnesWebAssist

the image file name needs to be stored in the database.

add a column to the users table for the profile picture.

on the update profile page, add a file filed, then add file upload.

in the update record behavior, bind the profile picture column to the Uploaded Files (File Field Name) -> Server File name binding.

Sign in to reply to this post

neil444064

I read it is better to store the images in a folder on the server and the filename in the database. Is this correct? Also I want to have a default pic in case the user does not upload a photo. Seems like surely I could do this with web assist.

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, that is correct, store the file name in the database by using the Server File Name binding in the update record behavior.

in the upload file behavior, you can define a default file name using the default file setting.

Sign in to reply to this post

neil444064

I am still a newbie with WA but where does one find the "update record behavior". Is it in Server Behaviors > Web Assist > Data Assist > Update > Update single record? I just need to understand once.

Sign in to reply to this post

Jason ByrnesWebAssist

That is you add the update record behavior to a new page, but is you have already run the security assist wizard to create your user login pages, the profile update page will have an update record behavior applied to it already.

to edit the update record behavior on the user profile page, open the sever behaviors panel, the find the update record behavior and double click it.

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