?? insertnew_sinfo.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>無標題文檔</title>
</head>
<body>
<?php
$connect=mysql_connect("localhost","root","vertrigo");
mysql_query("set names'gb2312'");
$m_id=$_POST["id"];
$m_username=$_POST["username"];
$m_passwd=$_POST["passwd"];
$m_sex=$_POST["sex"];
$m_age=$_POST["age"];
$m_class=$_POST["class"];
$m_academic=$_POST["academic"];
$m_tel=$_POST["tel"];
$m_email=$_POST["email"];
$sqlStr="insert into user_info (username,passwd,id,sex,age,class,academic,tel,email) ".
"values('$m_username','$m_passwd','$m_id','$m_sex','$m_age','$m_class','$m_academic','$m_tel','$m_email') ";
if(mysql_db_query("score_manager",$sqlStr))
echo "<script type='text/javascript'>alert('添加成功'); ".
" location.href='welcome.php';</script>";
else
echo "<script type='text/javascript'>alert('該學生已存在'); ".
" location.href='insert_Sinfo.php';</script>";
?>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -