如何在php中向表中插入数据?

I am trying to send data to a table in mysql using php. When I run the following query I don't get any error, but the data is not stored in my table. I can not see my error. Can anyone help me??

$connection = new mysqli($db['hostname'],$db['username'],$db['password'],$db['database']);

/*if($connection->connect_errno > 0){
die('Unable to connect to database['.$connection->connect_errno.']');
}*/

$sql_statement="INSERT INTO twitteraccounts('ID','accountName','ConsumerKey','ConsumerSecret','AccessToken','AccessTokenSecret') VALUES
(1,'TestingGerman','costumerKey','costumerSecret','accesToken','accesTokenSecret')";
mysqli_query($connection,$sql_statement);

?>

You don't get an error because you don't check for one. You should run your query like this

if(mysqli_query($connection,$sql_statement))
{
   // ok no errors
}
else
{
   printf("Error: %s
", mysqli_error($connection));
}

That will let you know what the error is, then you can fix your query. From the looks of it, the error seems to be the fact that you have column names inside single quotes which is not the right syntax; remove those.

Just retrieve the error like that :

if (!mysqli_query($connection,$sql_statement)) {
    printf("Erreur : %s
", $mysqli->error);
}

Check all type of fields. Ex: if ConsumerKey field is a number you can´t save string.

$sql_statement="INSERT INTO twitteraccounts('ID','accountName','ConsumerKey','ConsumerSecret','AccessToken','AccessTokenSecret') VALUES (1,'TestingGerman','costumerKey','costumerSecret','accesToken','accesTokenSecret')";

Regards