everything functions on the side of data validation and error gathering and such, I get a problem specifically where $r is being executed. I always get the echo error. I've used this same bit of code before, but for some reason isn't working. Just need a second look of eyes at it perhaps.
if (empty($errors)){
$q = "INSERT INTO testTable (test1, test2) VALUES ('Test', 'Test')";
$r = @mysqli_query($dbc, $q);
if($r){
echo 'Complete!';
}
else{
echo 'error';
}
mysqli_close($dbc);
include('footer.html');
exit();
I can enter the statement manually in MySQL and it will add it to the table, so I don't think its a syntax error there, I am just a little tired at this point.
echo 'error'toecho mysqli_error($dbc);so you see the reason for the error.or die(mysqli_error($dbc))tomysqli_query()and remove the@