Code of page making the error, the error is made on purpose to test the error.php:
$connect = mysql_connect("$sqlhost", "$sqlusername", "$sqlpassword");
if(!$connect){
$error = (mysql_error());
$report = "yes";
Include("error.php");
die();
}
Error.php: include("sql.php");
$connect = mysql_connect("$sqllhost", "$sqlusername", "$sqlpassword");
if(!$connect){
die(mysql_error());
}
$select_db = mysql_select_db("virtualeuphoria", $connect);
if(!$select_db){
die(mysql_error());
}
$insert = mysql_query("INSERT INTO errors (date, time, error) VALUES ('$date', '$time', '$error')");
if(!$insert){
die("There's little problem: ".mysql_error());
}
Here is the errorQuote
There's little problem: 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 'root'@'localhost' (using password: YES)')' at line 1
BUT! When I change the veriable error to bla, I dont get an error! I gotta change the variable, the value of it, and the name of the column in the table, but it works.
Can I not use a variable like "$error"? I also tried "$problem" and it didnt work.


Sign In
Create Account


Back to top









