php 入门

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 jin_hao_chen 阅读(...) 评论(...) 编辑 收藏

没有更多推荐了,返回首页