Chat room Php&mysql (v) _php Foundation

Source: Internet
Author: User
Fifth page 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 "It is said to have been occupied by others, please fill in 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>";
}

}


?>

<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>

<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= "Maxlength=" >
</p>
<p>
<input type= "text" name= "passwd" size= "" "Maxlength=" >
<input type= "hidden" name= userid "value=" <?echo $userid;? > ">
</p>
<p>
<select name= "Sex" >
<option value= "Handsome boy" > Handsome man </option>
<option value= "Sister" > 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 "> Users said </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 "> Sex </div>
</body>

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.