close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Need help with displaying dynamic images

Thread began 4/07/2009 3:41 pm by pistartech366237 | Last modified 4/10/2009 6:03 pm by pistartech366237 | 3837 views | 9 replies |

pistartech366237

Need help with displaying dynamic images

Hello,
I'm novice to PHP, MySQL, and DataAssist. I've created product pages with DataAssist 2. Everything is fine. I'm able to Insert the info into my MySQL database.

However, I do have a problem with displaying the ImageThumb or ItemImage (Large image) on either my result page or on the detail page. I've studied every tutorial on your website, as well as I've purchased the WA Database Training, however, it still doesn't have the exact explanation to how can I do that.

I'm binding my Image placeholder to the correct field in the DB, I'm putting folder name in front of the php code in the Src field.... nothing seems to work.

Please help!!!!

Thank you in advance.

Sign in to reply to this post

Ray BorduinWebAssist

put the directory where the image is located as well as the file name in the img src attribute.

something like: <img src="../youruploaddirectory/<?php echo($columnfromDB); ?>">

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

pistartech366237

Dear Ray,

First of all, thank you so much for your quick reply.

I've tried it and (probably I'm doing something wrong) it still doesn't work - I'm getting the following in the Live View - Image Thumb (instead of the image itself).

Here is what WA Data Assist has put for me there:

<?php echo($row_WADALogo['ItemThumb']); ?><img src="<?php echo $row_WADALogo['ItemThumb']; ?>" alt="ImageThumb" />

The directory, where my images are uploading is:

/Images/

Any suggestions?

Thank you so much in advance.

Best regards,

Paul.

Sign in to reply to this post

Ian

Hi Paul,

At the moment that code is looking for the image in the same directory as the page it is executed on.

You need to change the line:

<img src="<?php echo $row_WADALogo['ItemThumb']; ?>" alt="ImageThumb" />

to read

<img src="../images/<?php echo $row_WADALogo['ItemThumb']; ?>" alt="ImageThumb" />

but make sure that the relative path is correct for your folder structure.

Cheers
Ian

Sign in to reply to this post

pistartech366237

Hi Ian,

Thank you very much for replying.

I've tried with your advice.... same problem - it shows the alt text "ItemThumb" and that is it....

I've even tried to rebuild from the scratch all these pages using WA DataAssist 2, and have changed every img src line to what you've told me - same result....

In the Live View - it shows "?" instead of the image... In the browser - it shows "ItemThumb".

I've checked my MySQL database to make sure the field is correct - it is longblob....

Another thing that I've noticed is that the properties of that field are:
"http://mydomainname.com/Images/" which means that it doesn't understand that it has to show the particular image.

Sorry for my ignorance..... I just want to make sure I'm doing everything right.

Thank you in advance.

Best regards,

Paul.

Sign in to reply to this post

Ray BorduinWebAssist

Is the image name in the database? If it didn't get inserted properly it wouldn't display properly.

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

pistartech366237

Hi Ray,

Thank you again for replying.

You are right - it doesn't record into the database the name of the file.

I'm using the WA Digital File Pro server behavior to upload the files into the file fields of my insert.php page. Should I do anything differently?

Please advise.

Thank you very much in advance.

Best regards,

Paul.

Sign in to reply to this post

Ray BorduinWebAssist

What are you using for your insert server behavior? You should be using dataassist and binding the file field to the "server file name" value in the bindings panel.

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

pistartech366237

I'm using WA Digital File Pro and binding it to the file field in the insert form of the insert.php.

However, Dataassist wizard (when it builds the insert.php) it creates the text field in the insert form. Therefore, I'm deleting it and inserting the file field instead.

Please advise.

Thank you so much,

Paul.

Sign in to reply to this post

pistartech366237

Guys,

Thank you so-so much!!!! I've finally figured it out with your help!!!

It worked!!!!

You are great!!!

Best regards,

Paul.

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