This topic is locked

Help with if statement for custom display

3/7/2008 5:15:33 PM
PHPRunner General questions
C
Christopher author

Hi,
I have the following if statement I am trying to use, and the first loop seems to work find, but the last one definitely does not - a test with close status is not getting "CLOSED".

global $data;

if ($data["Status"]=="Open")

$value = "<a href=https://natshome.com/registrations/registrations_add.php?&CID=".$data["CombineID"]."&city=".$data["CombineCity"]."&state=".$data["CombineState"]."&title=".$data["CombineTitle"]."&session=".$data["SessionTitle"]."&date=".$data["CombineDate"].">Register Now</a>";

if ($data["Status"]=="Upcom")

$value = "";

if ($data["Status"]=="Close")

$value = "CLOSED";
J
Jane 3/11/2008

Hi,
it's difficult to tell you what's happening without seeing actual files.
Try to print all value for debugging:

global $data;

echo $data["Status"]."
";

...