alrite. Everytime I log into my site it works fine. But for some reason 1ce i do login the whole login panel box is blank. The only way i logout is by actually typing the index.php?act=logout thingy in da address bar. Anyone got a fix to this?
I'm guessing it has something to do with the index.php. here's part of the code:
Any ideas?Code:<!-- Login Panel --> <div id="loginpanel"> <?php if($_SESSION['username'] == ""){ ?> <form action="index.php?act=login" method="post"> <table border="0" width="209"> <tr><td height="20" style="font-weight:bold; font-size:13px; padding-bottom:4px; padding-left:6px;"><?php echo "Login Panel"; ?></td></tr> <tr><td height="30" align="center"><input type="text" name="username" maxlength="25" class="logusbg" /></td></tr> <tr><td height="29" align="center"><input type="password" name="password" size="30" maxlength="30" class="logpwbg" /></td></tr> <tr><td align="center"><a href="index.php?act=register" class="reg"></a><input type="submit" name="login" value="" class="log" /></td></tr> </table> </form> <?php }else{ $sqls = mssql_query("SELECT * FROM Character WHERE Name='".$_SESSION['username']."'"); if(mssql_num_rows($sqls)<>0){ while($ch = mssql_fetch_assoc($sqls)){ $sql = "SELECT Name FROM Clan WHERE MasterCID = '".$ch['CID']."'"; $nm = mssql_query($sql); $as = mssql_fetch_assoc($nm); ?> <table border="0" width="209"> <tr><td height="25" style="font-weight:bold; font-size:13px; padding-bottom:4px; padding-left:6px;"><?php echo "Welcome, ".$_SESSION['username']; ?></td></tr> <tr><td><b style="color:#FF6600;"><?php echo "Character Name :"; ?></b> <?=$ch['Name']; ?></td></tr> <tr><td><b style="color:#FF6600;"><?php echo "Character Level :"; ?></b> <?=$ch['Level']; ?></td></tr> <tr><td><b style="color:#FF6600;"><?php echo "Clan Name :"; ?></b> <?=$as['Name']; ?></td></tr> <tr><td height="5" align="center"><?php ?></td></tr> <tr><td align="center"> <?php if($_SESSION['UGradeID'] == $admin){ ?><a href="index.php?act=admin" class="admin_b"></a> <? } ?> <a href="index.php?act=logout" onclick="return confirmLogout()" class="logout"></a></td></tr> </table><?php }} ?> <?php } ?> </div> <!-- Login Panel End -->


Reply With Quote

