Jump to content


Photo

[SOLVED] why dont this work?


  • Please log in to reply
2 replies to this topic

#1 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 21 April 2006 - 01:54 AM

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


<? 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>";} ?>


#2 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 21 April 2006 - 02:13 AM

alright i found the problem ..

but got into a new one :-D

<? 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>";} ?>

now the include file doesn't show..

#3 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 21 April 2006 - 02:47 AM

ok i found the problem again.. so now is there any shorty way of going on about this?


<? 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>";} ?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users