Don’t laugh… but… I have sign in form on my page, but i want it gone when a user is signed in and a session is created. I have this working perfect but i have just one small question. In the code below, if a session has not started the sign in form is available, else
[code=php]echo hey echo hey . $_SESSION[‘loggedIn_s’];
Now, i want this part after the else gone (wher e it says hey to the user logged in. Can i simply just remove the else statment (and what follows it) or is this bad coding practices… If so what should i put instead of the else (is there something that i should be putting there to make the code more correct or stronger instead of just leaving it blank
[code=php]<?php
if (!isset($_SESSION[‘loggedIn_s’]))
echo ‘<form name=”SignIn” method=”post” action=”login.processor.php”>
<table width=”75%” border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td height=”38″ class=”sign_header”>Sign In To View Your Score</td>
</tr>
<tr>
<td class=”sign_text”>Username:</td>
</tr>
<tr>
<td height=”29″><input type=”text” name=”username” TABINDEX=1 maxlength=”20″><span class=”lost”> or<a href=”join.form.php” class=”linksFooter”> Join Here</a></span></td>
</tr>
<tr>
<td class=”sign_text”>Password:</td>
</tr>
<tr>
<td height=”29″><input type=”password” name=”password” TABINDEX=2 maxlength=”20″></td>
</tr>
<tr>
<td height=”36″><input type=”submit” name=”Submit” value=”Sign In”></td>
</tr>
<tr>
<td height=”36″ class=”lost”>Lost Your <a href=”lost.password.php” class=”linksFooter”>Password</a> ?</td>
</tr>
</table>
</form>’;
else
echo hey . $_SESSION[‘loggedIn_s’];
?>