Page 1 of 1

PHP (Query Strings)

Posted: Sat Jan 15, 2005 9:02 pm
by pao
HI,

When I try to add a user defined tag, I resive an error - it is not possible to ad a simple query?

Code: Select all

<a href="index.php?live=ye">side status = <? if (isset(live)) {echo $live;} else {echo "no"} ?></a>
Is it me who is making it wrong ?

thanks in advance

// Peter

PHP (Query Strings)

Posted: Sun Jan 16, 2005 3:46 am
by Ted
Keep in mind that an user defined tag has already put the start php tag in for you...

You want something like:

Code: Select all

?><a href="index.php?live=ye">side status = <?php if (isset(live)) {echo $live;} else {echo "no"} ?></a><?php
instead.

PHP (Query Strings)

Posted: Mon Jan 17, 2005 7:52 am
by pao
:oops: I forgot...

Thanks :lol: