Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Create an IF statement to recognize whether user is logged in

Quote Reply
Create an IF statement to recognize whether user is logged in
Anyone know how I can create an IF statement in perl that will recognize whether a user is logged in, and if they are will execute A (using session_id)...if they are not will execute B (using uid=default)?

For example:

<a href="db.cgi?do=search_results&db=jdamembers&<%if ??????%>sid=<%session_id%><%else%>uid=default<%endif%>&ls=A&col=Company_Name&sb=Company_Name">A</a>

Where the red highlighted section is the if statement (that I cannot seem to get to work) that will recognize if they are logged in or not. I have tried if session_id, ifnot cookie...but neither seems to work. The default never gets used.

Anyone know?
Subject Author Views Date
Thread Create an IF statement to recognize whether user is logged in Aberavon 4434 Mar 13, 2003, 3:42 PM
Thread Re: [Aberavon] Create an IF statement to recognize whether user is logged in
604 4336 Mar 13, 2003, 5:19 PM
Post Re: [TheStone] Create an IF statement to recognize whether user is logged in
Aberavon 4311 Mar 13, 2003, 8:30 PM