Gossamer Forum
Quote Reply
CGI vs PHP
<%if user.Username%>
do something here;
<%endif%>


<%if user.Status == 'Administrator'%>
do something here too;
<%endif%>

Given the above examples in an html document (which work just fine), what would the PHP code be?

I've tried:

<?php if ($user.Username) { ?>
<?php if ($user.Status == 'Administrator') { ?>

and

<?php if ($user->Username) { ?>
<?php if ($user->Status == 'Administrator') { ?>

and

<?php if ($user['Username']) { ?>
<?php if ($user['Status']== 'Administrator') { ?>

but I just can't get it right.

Thanks in advance for any help you can offer.

Roger
______________________________
Roger "Teresk" Brown
Stratics Central Content Director
Stratics Forums Programmer
Guild Forums Administrator
teresk@stratics.com
Quote Reply
Re: [Teresk] CGI vs PHP In reply to
PHP front-end was removed in v3. You will need v2.x if you want to use PHP in your templates.

Philip
------------------
Limecat is not pleased.