Jump to content

Query the wrong way round?


iamnottheend

Recommended Posts

I decided to make a last minute change to my site, unfortunately its not working. When i enter in the details for a portfolio item i have an input box where i can put in a large image of my art work. I have just realised that i would like the ability to group items, as a result i won't need the enlarge button. I have tried adding an if statement but it isn't working.

 

I want to type in "no" when i don't have a large image, this will then remove the enlarge button altogether from my portfolio page.

 

PHP

$photobig = $row['port_photobig'];
if ($photobig == "no") {
$port_photobig[] = NULL;
} else {
        $port_photobig[] = $photobig;
}

 

Site

 

Smarty HTML

{if $port_photobig[port] == NULL}

{else}
<a href="{$currentpage}" onClick="javascript:popUp('{$currentpage}?image={$port_id[port]}')"><img src="{$templates}images/enlarge.jpg" width="104" height="27" alt="View Large Image"  /></a>
{/if}

 

Help would be greatly appreciated

Link to comment
https://forums.phpfreaks.com/topic/44616-query-the-wrong-way-round/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.