1
cybz96
A little question about a php code
  • 2005/9/7 1:50

  • cybz96

  • Just popping in

  • Posts: 4

  • Since: 2005/8/26


Hello, I found a little script to alternate between login and logout depending on what the user is. Here it is:

<{if $xoops_isuser}>
<{$xoops_uname}> Logout ~ Account
<{else}>
nbsp;Log in of Registernbsp;
{/if}

It gives me an error, probably a stupid one:"syntax error: unclosed tag {else}". How do i close it?

And also, i'd like to display the user name, like: Welcome, anonymous, Welcome (name). Can u help me with this one? Thanks

2
davidthomas1
Re: A little question about a php code

Is it just me or should that last {/if} tag be an <{/if}> ??

i.e

<{if $xoops_isuser}>
<{
$xoops_uname}>&nbsp;<a href="<{$xoops_url}>/user.php?op=logout">Logouta>&nbsp;~&nbsp;<a href="<{$xoops_url}>/user.php">Accounta>
<{else}>
nbsp;<a href="<{$xoops_url}>/user.php">Log ina>&nbsp;of&nbsp;<a href="<{$xoops_url}>/register.php">Registera>nbsp;
<{/if}>


good luck!

D
みんなちがってみんないい。

XOOPS 2.0.13.2

3
cybz96
Re: A little question about a php code
  • 2005/9/7 15:14

  • cybz96

  • Just popping in

  • Posts: 4

  • Since: 2005/8/26


YEA i knew it was a stupid mistake. thanks. Can anyone tell me how to display the name of the user?

4
adrock
Re: A little question about a php code
  • 2005/9/7 16:01

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


Quote:

<{if $xoops_isuser}>Welcome Back <{$xoops_uname}>!
<{else}>Welcome Guest!
<{/if}>


Enjoy!
Affordable Web Hosting - Family - Fun!...and not always in that order!

Login

Who's Online

429 user(s) are online (355 user(s) are browsing Support Forums)


Members: 0


Guests: 429


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits