【php开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了php开源代码-usercenter.php的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<?php
session_start();
if($_SESSION[username]=="")
{
echo "<script>alert('您还没有登录,请先登录!');history.back();</script>";
exit;
}
?>
<?php
include("top.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<table width="766" height="438" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="209" height="438" valign="top" bgcolor="#F0F0F0"><?php include("left.php");?></td>
<td width="537" align="center" valign="top" bgcolor="#FFFFFF"><table width="500" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="550" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="left"> 当前用户 <span style="color: #0000FF">》 </span><?php echo $_SESSION[username];?> <span style="color: #0000FF">》</span><a href="usercenter.php">修改个人信息</a> <span style="color: #0000FF">》</span><a href="userleave
word.php">用户留言</a> <span style="color: #0000FF">》</span><a href="changeuserpwd.php">修改密码</a> <span style="color: #0000FF">》</span><a href="logout.php">注销离开 </a></div></td>
</tr>
</table>
<table width="500" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" bgcolor="#FFEDBF"><div align="center" style="color: #660206"><?php echo $_SESSION[username];?>的所有信息</div></td>
</tr>
<tr>
<td height="160" bgcolor="#FFEDBF"><table width="500" height="160" border="0" align="center" cellpadding="0" cellspacing="1">
<script language="javascript">
function chkinput1(form)
{
if(form.email.value=="")
{
alert("电子邮箱不能为空!");
form.email.select();
return(false);
}
if(form.email.value.indexOf('@')<0)
{
alert("电子邮箱输入错误!");
form.email.select();
return(false);
}
if(form.truename.value=="")
{
alert("真实不能为空!");
form.truename.select();
return(false);
}
if(form.sfzh.value=="")
{
alert("身份证号不能为空!");
form.sfzh.select();
return(false);
}
if(form.tel.value=="")
{
alert("联系电话不能为空!");
form.tel.select();
return(false);
}
if(form.dizhi.value=="")
{
alert("联系地址不能为空!");
form.dizhi.select();
return(false);
}
return(true);
}
</script>
<form name="form1" method="post" action="changeuser.php" onSubmit="return chkinput1(this)">
<?php
$sql=my
sql_query("select * from tb_user where name='".$_SESSION[username]."'",$conn);
$info=
mysql_fetch_array($sql);
?>
<tr>
<td width="100" height="20" bgcolor="#FFFFFF"><div align="center">昵称:</div></td>
<td width="397" bgcolor="#FFFFFF"><div align="left"><?php echo $_SESSION[username];?></div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center">真实:</div></td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input type="text" name="truename" size="25" class="inputcssnull" value="<?php echo $info[truename];?>">
</div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center">E-mail:</div></td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input type="text" name="email" size="25" class="inputcssnull" value="<?php echo $info[email];?>">
</div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center">QQ号码:</div></td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input type="text" name="qq" size="25" class="inputcssnull" value="<?php echo $info[qq];?>">
</div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center">联系电话:</div></td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input type="text" name="tel" size="25" class="inputcssnull" value="<?php echo $info[tel];?>">
</div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center">家庭住址:</div></td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input type="text" name="dizhi" size="25" class="inputcssnull" value="<?php echo $info[dizhi];?>">
</div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><div align="center">邮政编码:</div></td>
<td height="20" bgcolor="#FFFFFF"><div align="left">
<input