我一直在尝试以注册形式将我的托管sql数据库与mitinventor2连接起来,我收到一条错误信息
URL。错误1109
这是我的PHP代码:
<?php
DEFINE ('DBUSER', '******');
DEFINE ('DBPW', '*****');
DEFINE ('DBHOST', 's******');
DEFINE ('DBNAME', '*******');
$dbc = mysqli_connect(DBHOST,DBUSER,DBPW);
if (!$dbc) {
die("Database connection failed: " . mysqli_error($dbc));
exit();
}
$dbs = mysqli_select_db($dbc, DBNAME);
if (!$dbs) {
die("Database selection failed: " . mysqli_error($dbc));
exit();
}
$clientusername = mysqli_real_escape_string($dbc, $_GET['clientusername']);
$clientemail = mysqli_real_escape_string($dbc,$_GET['clientemail']);
$clientpno = mysqli_real_escape_string($dbc,$_GET['clientpno']);
$clientpass = mysqli_real_escape_string($dbc,$_GET['clientpass']);
$query = "INSERT INTO ssudb(clientusername, clientemail, clientpno, clientpass) VALUES ('$clientusername', '$clientemail', '$clientpno', '$clientpass')";
$result = mysqli_query($dbc, $query) or trigger_error("Query MySQL Error: " . mysqli_error($dbc));
mysqli_close($dbc);
?>
我确信数据库信息但我出于安全原因隐藏它们。我的数据库结构良好,使用phpmyadmin。
php文件的链接没有错误,这是我的mit发明者块:
我希望我没有验证任何规则。 提前谢谢!
请注意: 当打开phpmyadmin somtimes时,我看到表中有新属性,但没有值,但增量ID。
答案 0 :(得分:0)
$ clientlocation