check_friend.php
来自「十大精典PHP项目开发全程案例+代码」· PHP 代码 · 共 28 行
PHP
28 行
<?php
session_start();
include "Conn/conn.php";
if($_POST["regsubmit"]<>""){
$name=$_POST[txt_name];
$sex=$_POST[txt_sex];
$bir=$_POST[txt_bir];
$city=$_POST[txt_province].$_POST[txt_city];
$address=$_POST[txt_address];
$postcode=$_POST[txt_postcode];
$email=$_POST[txt_email];
$tel=$_POST[txt_tel];
$handset=$_POST[txt_handset];
$QQ=$_POST[txt_QQ];
$username=$_SESSION[username];
$INS="Insert Into tb_friend (name,sex,bir,city,address,postcode,email,tel,handset,QQ,username) Values ('$name','$sex','$bir','$city','$address','$postcode','$email','$tel','$handset','$QQ','$username')";
$result=mysql_query($INS);
if($result){
echo "<script> alert('该信息添加成功!');</script>";
echo "<script> window.location='friend.php';</script>";
}
else{
echo "<script> alert('添加操作失败!');</script>";
echo "<script> window.location='friend.php';</script>";
}
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?