$db= mysqli_connect('localhost',$user, $pass, $dbname);
if (!$db) {
die("Connection failed: " . mysqli_connect_error());
}
$sql="Insert into 'testtable' ('Tool','Request Date') values('selenium','2015-6-6') ";
the above code is for inserting a row in sql table running on xampp.
table has 3 fields id(primary key/auto inc.),date and tool.
for some reason the the code is not working.
I am getting no particular error .
$result = mysqli_query($db,$sql);
print_r($result);
if ($result) {
echo "success";
} else {
echo "failed";
}
only "failed" in printed in console,web browser etc.