php 入门


<?php
    $username = $_POST["username"];
    $passcode = $_POST["passcode"];
    # 一定要mysqli_connect
    $con = mysqli_connect("jh.bux.org", "jh", "jhisjh", "mytest");
    # 一定要加引号
    $sql = "insert into userinfo (username, password) values ('$username', '$passcode');";
    mysqli_query($con, $sql);
    mysql_close($con);

?>
posted @ 2018-11-02 22:37  gogogo11  阅读(124)  评论(0编辑  收藏  举报