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] Quote Link to comment 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.. Quote Link to comment 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] Quote Link to comment 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.