Code makes box appear after log-in

I’m using this web script that works successfully. It has a section where I can add a text box to appear upon a web user log-in. Instead, what I’d like to do is make the log-in box (form) disappear as soon as the user logs-in. Can you tell where(how) I can change this code to accomplish that? Thanks for any help.

<form action="login.php" method="post" accept-charset="UTF-8" class="middletext">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label><font class="font4_15">Username</font></label><span class="username"><input type="text" name="user_name_login" size="9" style="width:70px;" />
&nbsp;&nbsp;<label><font class="font4_15">Password</font></label><span class="password"><input type="password" name="password_login" size="9" style="width:70px;" />
<input type="submit" value="[var.lang_login_now]" class="btn_vid1" /></a><!--<a href="login.php"></a>-->
<input type="hidden" name="submitted" value="yes" />
<input type="hidden" name="remember_me" value="remember_me" />
</form>
</td></tr></table>

<!--Begin Text Box-->
  <!--<div id="txt-box">-->
  <table id="tabX44">
      				<tbody>
				<tr><td>
  <!--<div class="header-narrow">Text Box</div>-->
  <div class="txt-narrow">

  </div>
  <!--<div class="container-narrow-bottom"></div>-->
  <!--[onload_337;block=div;when [var.show_login_box]!=1;comm]-->
        </td></tr>
  	  				</tbody>
				</table>
  <!--</div>-->
  <!--End Text Box-->

It looks like this should be enclosed in conditional statements if you want the login box to disappear.

For example:

if($user == ‘guest’){
//display login form
}
else if($user == ‘logged in’){
//display nothing
}

and then have the page refresh when the submit button is clicked.

However,
I’m going to assume you just copied this script off some random site and need help removing the garbage you don’t want… get rid off all this junk… (or just hire someone who knows what theyre doing).

value=“[var.lang_login_now]”

(replace with value=“submit” or just get rid of value altogether)

<!–<a href=“login.php”></a>–>

<!–Begin Text Box–>
<!–<div id=“txt-box”>–>
<table id=“tabX44”>
<tbody>
<tr><td>
<!–<div class=“header-narrow”>Text Box</div>–>
<div class=“txt-narrow”>

</div>
<!–<div class=“container-narrow-bottom”></div>–>
<!–[onload_337;block=div;when [var.show_login_box]!=1;comm]–>
</td></tr>
</tbody>
</table>
<!–</div>–>

You don’t need any of that garbage.