You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near ''users' VALYES('','users')' at line 1
I use phpMyAdmin Version information: 4.2.0 (up to date).
我使用phpMyAdmin版本信息:4.2.0(最新)。
But I have : The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.
但我有:phpMyAdmin配置存储未完全配置,某些扩展功能已被停用。要找出原因,请点击此处。
Open new phpMyAdmin window
打开新的phpMyAdmin窗口
Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'.
您的配置文件包含与默认MySQL特权帐户对应的设置(root,无密码)。您的MySQL服务器在此默认情况下运行,可以入侵,您真的应该通过为用户“root”设置密码来修复此安全漏洞。
My code is :
我的代码是:
<?php
$connect = mysql_connect('localhost','root','') or die(mysql_error());
mysql_select_db('Happydate_db');
if (isset($_POST['submit']))
$users = $_POST['users'];
$query = mysql_query("INSERT INTO users VALYES('',`users`)")or die(mysql_error())
?>
<form method="post" action="signup.php">
<input type="text" name="users" placeholder= " | users" required/> <br>
<input type="submit" name="submit" value="signup" />
</form>
What it can be?
它可以是什么?
1 个解决方案
#1
0
It is not VALYES
. It is VALUES
它不是VALYES。这是价值
$query = mysql_query("INSERT INTO users VALUES('','users')")or die(mysql_error())
For reference http://www.w3schools.com/sql/sql_insert.asp
供参考http://www.w3schools.com/sql/sql_insert.asp
#1
0
It is not VALYES
. It is VALUES
它不是VALYES。这是价值
$query = mysql_query("INSERT INTO users VALUES('','users')")or die(mysql_error())
For reference http://www.w3schools.com/sql/sql_insert.asp
供参考http://www.w3schools.com/sql/sql_insert.asp