Gossamer Forum
Home : Products : Gossamer Links : Discussions :

an If statement

(Page 2 of 2)
> >
Quote Reply
Re: [Ian] an If statement In reply to
OK, this is a bit messy, but that is so I can track where it is failing...



Here is the EXACT code I am using:



<%Username%>..<%user_name%>

<%if Username%>



<%user_name%> 1
....<%Username%>2
<%if Username eq user_name%>


3

<H3><CENTER><A HREF="<%db_cgi_url%>/edit_login.cgi?g=Edit&user_name=<%Username%>">Edit Your Profile</A></CENTER></H3>


<%endif%>


<P>

<%endif%>



So, I should get "admin" twice with the first line, if both are defined...

Then,, I should get a 1 and a 2.... then a 3, then the final link...



Here is the output from the page...



admin..admin admin 1 ....admin2



No 3, and no link. I tried doing a <%a eq Username%>, and when that prints, it prints "Username" NOT what Username should be...



dave

dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] an If statement In reply to
Hi Dave,

Based on other posts in this thread, I think you want to use

<%if Username eq $user_name%>



--
Matt G
Quote Reply
Re: [Matt Glaspie] an If statement In reply to
Yep, that would be correct!Wink


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] an If statement In reply to
Matt/Ian:



THanks- yep, it was that pesky missing "$" that did it. Sorry I am so blind sometimes- and I appreciate you hitting me over the head with it!!!



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
> >