无法在mysql php中保存数据

时间:2015-07-30 12:18:54

标签: php android mysql

我创建了具有登录和注销功能的Android应用程序,可将数据保存到远程数据库。问题是,当我尝试保存数据时,它无法正常工作。

然后我检查了我是否可以在我的php数据库中保存数据..所以我在我的php页面上发现错误..

Register.php

<?php
$con=mysqli_connect("mysql8.000webhost.com" , "---" , "passhere" , "---");

$name = $_POST["name"];
$email = $_POST["email"];
$age=$_POST["age"];
$username = $_POST["username"];
$password = $_POST["password"];
$date = $_POST["date"];
$time = $_POST["time"];

$statement = mysqli_prepare($con, "INSERT INTO check(name,email,age,username,password,date,time) VALUES (?,?,?,?,?,?,?) ");
mysqli_stmt_bind_param($statement, "ssissss" , $name, $email , $age , $username , $password, $date, $time);
mysqli_stmt_execute($statement);
mysqli_close($con);
?>

这是错误:

Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given in /home/a9447544/public_html/test/Register.php on line 13


Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, boolean given in /home/a9447544/public_html/test/Register.php on line 14

您可以自己查看:

http://funvilla.in/test/Register.php?name=abc&email=abc&age=2&username=gnjf&password=fdfg&date=4jn4j5&time=938434h3h

0 个答案:

没有答案