$statement = $con->prepare(INSERT INTO details(firstname, lastname, salary, image, hardcopy) VALUES(?, ?, ?, ?, ?)); $statement->bindValue(1, $_POST[firstname]); $statement->bindValue(2, $_POST[lastname]); $statement->bindValue(3, $_POST[salary]); $statement->bindValue(4, $_POST[image]); $statement->bindValue(5, isset( $_POST[hardcopy]) ? 1 : 0); $statement->execute(); }
©