Chatting Room php & amp; mysql (5)

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.