获得的数据怎么存不数据库(mysql)里,与数据库端口?请高人指点,谢谢
(说明:数据获得了,但就存不到mysql?)
第一部分:
第二部分:
$username =$_POST['username'];
$userpass =$_POST['userpass'];
$conn = mysql_connect("localhost", "root", "admin") or die("连接错误".MySQL_error()) ;
mysql_select_db("test", $conn);
$sql="INSERT INTO cctm_tal(username,userpass) VALUES ('$username','$userpass')";
MySQL_query($sql,$conn);
echo "注册成功.";
mysql_close($conn);
?>
第三部分:(表字段)
CREATE TABLE `cctm_tal` (
`username` varchar(255) NOT NULL,
`userpass` varchar(255) NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
MySQL ------解决方案--------------------贴出来报错信息 是没权限还是格式错误还是语法错误
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn