Page 5 name = "changenick. php"
<?
Include "../signup/mysql. php ";
// Echo $ userid;
If ($ action = "OK ")
{
$ SQL = "select * from chat_user_list where userid = '$ nick '";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
If (! $ Result) echo "this name has been occupied by another person. Please enter it again ";
Else
{
$ SQL = "update chat_user_list set id = '$ nick', passwd = '$ passwd', sex =' $ sex' where userid = '$ userid '";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
$ SQL = "update chat_user set id = '$ nick', passwd = '$ passwd', sex =' $ sex' where userid = '$ userid '";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
}
If ($ result ){
Echo "<script language = 'javascript '> window. close () </script> ";
}
}
?>
<Html>
<Head>
<Title >::: FEIT chat room ::: </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Script language = "JavaScript">
<! --
Function MM_reloadPage (init) {// reloads the window if Nav4 resized
If (init = true) with (navigator) {if (appName = "Netscape") & (parseInt (appVersion) = 4 )){
Document. MM_pgW = innerWidth; document. MM_pgH = innerHeight; onresize = MM_reloadPage ;}}
Else if (innerWidth! = Document. MM_pgW | innerHeight! = Document. MM_pgH) location. reload ();
}
MM_reloadPage (true );
// -->
</Script>
</Head>
<Body bgcolor = "# ffffff" text = "#000000">
<Div id = "Layer1" style = "position: absolute; left: 40px; top: 28px; width: 293px; height: 202px; z-index: 1; background-color: # 6699FF; layer-background-color: # 6699FF; border: 1px none #000000 "> </div>
<Div id = "Layer2" style = "position: absolute; left: 144px; top: 54px; width: 126px; height: 70px; z-index: 2">
<Form name = "form1" method = "post" action = "<? Echo $ PHP_SELF?>? Action = OK ">
<P>
<Input type = "text" name = "nick" size = "12" maxlength = "20">
</P>
<P>
<Input type = "text" name = "passwd" size = "12" maxlength = "20">
<Input type = "hidden" name = "userid" value = "<? Echo $ userid;?> ">
</P>
<P>
<Select name = "sex">
<Option value = "handsome guy"> handsome guy </option>
<Option value = ""> Meimei </option>
</Select>
</P>
<P>
<Input type = "submit" name = "OK" value = "change" align = "center">
</P>
</Form>
</Div>
<Div id = "Layer3" style = "position: absolute; left: 72px; top: 58px; width: 72px; height: 20px; z-index: 3 "> what about users </div>
<Div id = "Layer4" style = "position: absolute; left: 72px; top: 99px; width: 71px; height: 23px; z-index: 4 "> User Password </div>
<Div id = "Layer5" style = "position: absolute; left: 82px; top: 139px; width: 58px; height: 20px; z-index: 5 "> gender </div>
</Body>
</Html>