国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

PHP ?? ?? ?? ??? ?? ?? PHP ???

add.php ????? ??? ???? ?? ??????? ?????


?: ? ??????? ??, ??, ??? ?? PHP ??? ??? PHP ???? ????. ??? ? ??? ??? ?? ??? ???? action.php ?? ?????. ??, ?? ? ?? ??? ???? ?? ???? ?? ??? ?????


??????? ?? ?????

??(" content-type:text/html;charset=utf8");
$conn=mysqli_connect("localhost","root","root","study");
mysqli_set_charset($conn,"utf8") ;

?? ????? ???? ??? ?????

$name = $_POST['name'];
$sex = $_POST['sex'];
$age = $_POST['age'] ;
$ class = $_POST['class'];

??????? ??? ??

$sql = "stu (`name`, sex, age, class) ?? ?? ??('$name', '$ sex','$age','$class')";
$rw = mysqli_query($conn,$sql);

??? ?? ?? ??? ?????

<?php
header("content-type:text/html;charset=utf8");
$conn=mysqli_connect("localhost","root","root","study");
mysqli_set_charset($conn,"utf8");
if($conn){
    switch ($_GET['action']){
        case 'add'://add
            $name = $_POST['name'];
            $sex = $_POST['sex'];
            $age = $_POST['age'];
            $class = $_POST['class'];
            $sql = "insert into stu (`name`, sex, age, class) values ('$name', '$sex','$age','$class')";
            $rw = mysqli_query($conn,$sql);
            if ($rw > 0){
                echo "<script>alert('添加成功');</script>";
            }else{
                echo "<script>alert('添加失敗');</script>";
            }
            }
            }
            header('Location: index.php');
            break;
            ?>

?? ??? ??? ???? ????. ??? ??? ?????



???? ??
||
<?php header("content-type:text/html;charset=utf8"); $conn=mysqli_connect("localhost","root","root","study"); mysqli_set_charset($conn,"utf8"); if($conn){ switch ($_GET['action']){ case 'add'://add $name = $_POST['name']; $sex = $_POST['sex']; $age = $_POST['age']; $class = $_POST['class']; $sql = "insert into stu (`name`, sex, age, class) values ('$name', '$sex','$age','$class')"; $rw = mysqli_query($conn,$sql); if ($rw > 0){ echo "<script>alert('添加成功');</script>"; }else{ echo "<script>alert('添加失敗');</script>"; } } } header('Location: index.php'); break; ?>