?? modify1.php
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標(biāo)題文檔</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: small;
color: #6666CC;
}
-->
</style>
</head>
<body>
<?
/*表單匹配*/
include("head.inc");
require('db_start.inc');
$user_id=$_POST[username];
$id=$_POST[id];
$name=$_POST[name];
$user_id=$_POST[username];
$password=$_POST[password];
$address=$_POST[address];
//$hobby=$_POST[hobby];
$chknum=$_POST[chknum];
$checknum=$_POST[checknum]; /*傳遞過來驗(yàn)證*/
$phone1=$_POST[phone1];
$phone2=$_POST[phone2];
$phone=$phone1."-".$phone2;
$sex=$_POST[sex];
$idtify=$_POST[idtify];
$year=$_POST[year];
$month=$_POST[month];
$day=$_POST[day];
$sex=$_POST[sex];
$qq=$_POST[qq];
$email=$_POST[email];
$telephone=$_POST[telephone];
$personal=$_POST[personal];
$a1="";
if($_POST['checkbox']['a']) $a1.="游泳 ";
if($_POST['checkbox']['b']) $a1.="跑步 ";
if($_POST['checkbox']['c']) $a1.="旅游 ";
if($_POST['checkbox']['d']) $a1.="聽歌 ";
if($_POST['checkbox']['e']) $a1.="釣魚 ";
if($_POST['checkbox']['f']) $a1.="打球 ";
if($_POST['checkbox']['g']) $a1.="寫作 ";
if($_POST['checkbox']['h']) $a1.="打機(jī) ";
if($_POST['checkbox']['i']) $a1.="其他";
$hobby=$a1 ;
$a=eregi("^[a-z0-9]{5,10}$",$user_id);
//s$b=ereg("[a-z0-9]{1,12}",$name);
$c=eregi("^[a-z0-9]{6,12}$",$password);
$d=ereg("^[0-9]{15,18}$",$idtify);
$e=ereg("^[0-9]{3,4}$",$phone1);
$f=ereg("^[0-9]{7,8}$",$phone2);
$g=ereg("^[0-9]{7,9}$",$qq);
$h=ereg("[a-z0-9]{3,12}@[a-z0-9]{3,12}.[a-z0-9]{3,5}",$email);
$i=ereg("^[0-9]{11}$",$telephone);
if(!$a)
echo "<script> alert('請輸入正確的用戶名!');history.back();</script>";
if(!$c)
echo "<script> alert('請輸入正確的密碼!');history.back();</script>";
if(!$d)
echo "<script> alert('身份證號碼非法!');history.back();</script>";
if(!$e)
echo "<script> alert('電話號碼區(qū)號非法!');history.back();</script>";
if(!$f)
echo "<script> alert('電話號碼區(qū)號非法!');history.back();</script>";
if( $chknum!=$checknum)
echo "<script> alert('驗(yàn)證碼不匹配!');history.back();</script>";
if($qq)
{
if(!$g)
echo "<script> alert('qq號碼非法!');history.back();</script>";
}
if($email)
{
if(!$h)
echo "<script> alert('email號碼非法!');history.back();</script>";
}
if($telephone)
{
if(!$i)
echo "<script> alert('手機(jī)號碼非法!');history.back();</script>";
}
if(!($_POST['checkbox']['a']||$_POST['checkbox']['b']||$_POST['checkbox']['c']||$_POST['checkbox']['d']||$_POST['checkbox']['e']||$_POST['checkbox']['f']||$_POST['checkbox']['g']||$_POST['checkbox']['h']||$_POST['checkbox']['i']))
echo "<script> alert('請?zhí)顚懪d趣欄!');history.back();</script>";
/*
echo '$user_id'.$user_id;
echo '$name'.$name;
echo '$password'.$password;
echo '$address'. $address;
echo '$phone'.$phone;
echo '$sex'.$sex;
echo '$idtify'.$idtify;
//echo $chknum;
//echo $checknum;
echo $year."年".$month."月".$day."日";
echo '$qq'.$qq;
echo '$email'. $email;
echo '$telephone'.$telephone;
echo '$personal'.$personal;
echo '$hobby'.$hobby;
*/
$sql="UPDATE web_user SET user_id = '$user_id',name = '$name', password='$password',birth_y ='$year',birth_m='$month', birth_d='$day' ,hobby='$hobby', phone='$phone' ,telephone='$telephone',idtify='$idtify',address='$address' ,qq='$qq',email= '$email',personal ='$personal 'WHERE id ='$id '";
//
$result = mysql_query($sql);
?>
<div align="center" class="STYLE1" >正在modify....3s后返回show.php!</div>
<META HTTP-EQUIV=Refresh CONTENT="3; URL=show.php">
<div align="center" class="STYLE1">
如果沒返回請按 <a href="show.php">返回show </a> !</div>
</body>
<?
require('copyright.inc');
?>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -