Sorry, but I'm a bit desperate.
I have a database in which there's fields of event names and fields of URLs (all entered manually). I need an if/else statement that shows just the event name in a repeated region in a table ONLY if the URL field is NULL. Or else, it should show the event name and link to the URL listed in the corresponding URL field. Here's what I have, but it's not working. Any suggestions?
Info:
weddingEvent is the name given to this particular instance of the bound table. I used Dreamweaver, and it did the row_weddingEvent stuff on its own.
eventName is the name of the event and is a field in the table.
URL is the URL leading to a photo gallery of that event.
I need to get the URL to be used as a link with the text showing up as eventName in the php file when people look at it.
<?php if $row_weddingEvent['URL']=NULL ?><td><?php echo $row_weddingEvent['eventName']; ?></td>
<?php else ?><td><?php echo $row_weddingEvent['eventName']; ?></td>
Is this right? My page is showing up blank, but if I get rid of the if, else, and a href, it shows up fine (with a simple repeated region of weddingEvent['eventName'] by itself). A FULL HTML encoded page can be found here: http://www.dattiliostudio.com/phpExample.txt
-Galen
I have a database in which there's fields of event names and fields of URLs (all entered manually). I need an if/else statement that shows just the event name in a repeated region in a table ONLY if the URL field is NULL. Or else, it should show the event name and link to the URL listed in the corresponding URL field. Here's what I have, but it's not working. Any suggestions?
Info:
weddingEvent is the name given to this particular instance of the bound table. I used Dreamweaver, and it did the row_weddingEvent stuff on its own.
eventName is the name of the event and is a field in the table.
URL is the URL leading to a photo gallery of that event.
I need to get the URL to be used as a link with the text showing up as eventName in the php file when people look at it.
<?php if $row_weddingEvent['URL']=NULL ?><td><?php echo $row_weddingEvent['eventName']; ?></td>
<?php else ?><td><?php echo $row_weddingEvent['eventName']; ?></td>
Is this right? My page is showing up blank, but if I get rid of the if, else, and a href, it shows up fine (with a simple repeated region of weddingEvent['eventName'] by itself). A FULL HTML encoded page can be found here: http://www.dattiliostudio.com/phpExample.txt
-Galen
Kommentar