Adobe Dreamweaver Forums



Last 10 THreads :         Spry menu hover issue (Last Post : danantal - Replies : 0 - Views : 1 )           »          Writing in different languages (Last Post : neebie - Replies : 0 - Views : 1 )           »          DW creating wrong ASP recordset (Last Post : Edson Correa - Replies : 4 - Views : 5 )           »          RoboHelp hanging (Last Post : Benjaminson - Replies : 2 - Views : 3 )           »          Insert "Search" in a Topic (Last Post : Peter Grainge - Replies : 1 - Views : 2 )           »          logging all unhandled errors (Last Post : TavoGM - Replies : 1 - Views : 2 )           »          outputting bitmap path from xml file (Last Post : Laura MS - Replies : 0 - Views : 1 )           »          outputting bitmap path from xml file (Last Post : Laura MS - Replies : 0 - Views : 1 )           »          outputting bitmap path from xml file (Last Post : Laura MS - Replies : 0 - Views : 1 )           »          Drop Down Sub Buttons (Last Post : NedWebs - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Application Development
 
Tags:



Reply
  #1 (permalink)  
Old 10-01-2008, 01:49 PM
matthew stuart
 
Posts: n/a
Diggs:
Default Show or hide a region based on content

What I want to do is show a region based on content from a field in a db record.

Show region if resortset is empty isn't what I want as the record isn't empty,
it's just that part of the record is empty, so I want to show an image in its
place.

I know how to do it in ASP, but not PHP. ASP is like this:

<%IF (recordset.Fields.Item("fld_image").Value) <> "none" Then%>
NOTHING TO SHOW
<%End IF%>

So, how do I do that with PHP?

Thanks

Mat



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-01-2008, 01:49 PM
David Powers
 
Posts: n/a
Diggs:
Default Re: Show or hide a region based on content

matthew stuart wrote:
> <%IF (recordset.Fields.Item("fld_image").Value) <> "none" Then%>
> NOTHING TO SHOW
> <%End IF%>


The following code displays the output if the field actually contains
something. If it contains nothing, it's ignored.

if (!empty($row_recordsetName["fld_image"])) {
echo $row_recordsetName["fld_image"];
}

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Reply With Quote
  #3 (permalink)  
Old 10-01-2008, 01:49 PM
David Powers
 
Posts: n/a
Diggs:
Default Re: Show or hide a region based on content

matthew stuart wrote:
> <%IF (recordset.Fields.Item("fld_image").Value) <> "none" Then%>
> NOTHING TO SHOW
> <%End IF%>


The following code displays the output if the field actually contains
something. If it contains nothing, it's ignored.

if (!empty($row_recordsetName["fld_image"])) {
echo $row_recordsetName["fld_image"];
}

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:03 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk