[Chronoconnectivity] pass {variable} to php

matteo83 06 Mar, 2010
Hi,
sorry for my bad english, i'm italian, i try to explain me.
In ChronoConnectivity I have a variable {published} from db and I want use it in my php code.
I try this:

<?php
if ('{published}'=='0') echo "<img src='images/sem_red.gif'>";
else echo "<img src='images/sem_green.gif'>";
?>

but it don't work; i want get that if variable is 0, i see a red gif, and if variable is 1, i see a green gif; i see always a green gif, seems that php can't read the value of variable {published}.

have you any idea how can i solve the problem?

Thanks,
Matteo
GreyHead 06 Mar, 2010
Hi Matteo,

You are correct, because of the order that the code is executed you can't get a variable that way to use in PHP. Use $MyRow->published instead.

Bob
matteo83 06 Mar, 2010
Thanks so much!
It work!!
This topic is locked and no more replies can be posted.