corillo181 Posted April 21, 2006 Share Posted April 21, 2006 i thought this would let a user log in not to see this part of a table and a log out user is able to see it[code]<? if(isset($_SESSION['username'])){ echo "ok";} else{ echo "<tr> <td background='BOTTLOM.jpg' class='menutxt'>Log in </td> </tr> <tr> <td id='loginSN'><?php include 'login.html' ?></td> </tr>";} ?>[/code] Link to comment https://forums.phpfreaks.com/topic/8015-solved-why-dont-this-work/ Share on other sites More sharing options...
corillo181 Posted April 21, 2006 Author Share Posted April 21, 2006 alright i found the problem ..but got into a new one :-D[code]<? if(isset($_SESSION['username'])){ echo "<tr><td background='images/BOTTLOM.jpg' class='menutxt'><a href=../phpscript/logout.php>LogOut</a></td></tr>";} else{ echo "<tr> <td background='images/BOTTLOM.jpg' class='menutxt'>Log in </td> </tr> <tr> <td id='loginSN'> <? echo include '/htmlforms/login.html' ?> </td> </tr>";} ?>[/code]now the include file doesn't show.. Link to comment https://forums.phpfreaks.com/topic/8015-solved-why-dont-this-work/#findComment-29215 Share on other sites More sharing options...
corillo181 Posted April 21, 2006 Author Share Posted April 21, 2006 ok i found the problem again.. so now is there any shorty way of going on about this?[code] <? if(isset($_SESSION['username'])){ echo "<tr><td background='BOTTLOM.jpg' class='menutxt'><a href=logout.php>LogOut</a></td></tr>";} else{ echo "<tr> <td background='BOTTLOM.jpg' class='menutxt'>Log in </td> </tr> <tr> <td id='loginSN'>"?> <? include 'login.html' ?><? "</td> </tr>";} ?>[/code] Link to comment https://forums.phpfreaks.com/topic/8015-solved-why-dont-this-work/#findComment-29224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.