Create a Prepared Statement

function insertValues($value_1, $value_2, $value_3) { $conn = $this -> getConnection(); $stmt = $conn -> prepare("INSERT INTO Table_Name (Column_1, Column_2, Column_3) VALUES (?, ?, ?)"); $stmt -> bindParam(1, $value_1); $stmt -> bindParam(2, $value_2); $stmt -> bindParam(3, $value_3); $success_result = $stmt -> execute(); // returns bool return $success_result; }