Deon Posted May 22, 2006 Share Posted May 22, 2006 Hi there,This is my 1st attempt with the following in PHP. Here is the code in ASP:<% if Session("MM_Username") = "" then %>Visitor!<%End If %><% if Session("MM_Username") <> "" then %><!--#include file="../includes/incl_logout.asp" --><%End If%>How does this look in PHP? I have no idea and it seems that no one can help me out.This is the same as with this forum. When I am not logged in, the login option shows. When I am logged in, My name together with the Log Out option shows. I have noticed that with this forum it is done with different <div> tags, but it does not need to be the same with my script.I will really appreciate your help.Regards,Deon Quote Link to comment https://forums.phpfreaks.com/topic/10167-sessions-show-if/ Share on other sites More sharing options...
jeremywesselman Posted May 22, 2006 Share Posted May 22, 2006 If you are familiar with ASP, you should be able to easily conver this code to php. Just a slight chage of syntax.[code]<?phpif (!isset($_SESSION['MM_Username'])){?>Visitor<?php}else{ include('../includes/incl_logout.php');}?>[/code]That is pretty much the same code that you have gave me, but in php.[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/10167-sessions-show-if/#findComment-37901 Share on other sites More sharing options...
Deon Posted May 22, 2006 Author Share Posted May 22, 2006 Jeremy,thank you so much for this reply. I REALLY appreciate your reply. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Regards,Deon Quote Link to comment https://forums.phpfreaks.com/topic/10167-sessions-show-if/#findComment-37902 Share on other sites More sharing options...
Deon Posted May 22, 2006 Author Share Posted May 22, 2006 [!--quoteo(post=375986:date=May 22 2006, 10:55 AM:name=jeremywesselman)--][div class=\'quotetop\']QUOTE(jeremywesselman @ May 22 2006, 10:55 AM) [snapback]375986[/snapback][/div][div class=\'quotemain\'][!--quotec--]If you are familiar with ASP, you should be able to easily conver this code to php. Just a slight chage of syntax.[code]<?php}else{ [color=#CC0000]include('../includes/incl_logout.php')[/color];}?>[/code][/quote]Jeremy,how can I insert a table in the red coded space. When I try to just insert a table there, I get errors of missing omjects.Regards,Deon[!--quoteo(post=375986:date=May 22 2006, 10:55 AM:name=jeremywesselman)--][div class=\'quotetop\']QUOTE(jeremywesselman @ May 22 2006, 10:55 AM) [snapback]375986[/snapback][/div][div class=\'quotemain\'][!--quotec--]If you are familiar with ASP, you should be able to easily conver this code to php. Just a slight chage of syntax.[code]<?php}else{ [color=#CC0000]include('../includes/incl_logout.php')[/color];}?>[/code][/quote]Jeremy,how can I insert a table in the red coded space. When I try to just insert a table there, I get errors of missing objects.Regards,Deon Quote Link to comment https://forums.phpfreaks.com/topic/10167-sessions-show-if/#findComment-37931 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.