rendered paste body<?php
$nick = trim($_POST["nick"]);
if ( isset($_POST["nick"]) ) {
if (strlen($nick) <= 3) { ?>
<div id="notice" style="font-weight:bold;">Nickname must be atleast 4 characters in length.</div>
<hr />
<div id="note">Enter a nickname:</div>
<form method="post" action="chat.php" onsubmit="send_nick(this); return false;">
<input type="text" name="n" size="30" />
<input type="submit" value="Continue ->" name="btnSubmit" />
</form>
<? >} else { ?>
<div id="notice" style="font-weight:bold;">Hello ".strtolower($nick).", Welcome to the chat.</div>
<hr />
<div id="container">
<div id="chat"></div>
</div>
<div id="sndText">
<form id="sndText" method="post" action="chat.php" onsubmit="change('chat',this); return false;">
<input type="text" name="ctext" size="30" />
<input type="submit" value="Send" name="btnSend" />
</form>
</div>
<br />
<?
}
}
?>