The code works thou
Clearly it doesn't.
Did you remove the parenthesis?
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
The code works thou
// Database details
$dbhost = 'localhost';
$dbuser = 'youruser';
$dbpass = 'yourpass';
$dbname = 'yourdb';
// Connects to your Database
$db = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if($db->connect_errno > 0){
die('Unable to connect to database [' . $db->connect_error . ']');
}
$statement = $db->prepare("INSERT INTO table (`value_1`, `value_2`, `value_3`) VALUES (?, ?, ?)");
$statement->bind_param('sss', $postvalue1, $postvalue2, $postvalue3);
$statement->execute();
$statement->close();
Clearly it doesn't.
Did you remove the parenthesis?