![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
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 |
| Sponsored Links |
|
|||
|
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/ |
|
|||
|
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/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise